Comments (12)
I see a warning like below on the consul server running on machine A. Not sure if that can be the cause.
2016/12/03 19:51:54 [WARN] Service name "foo.example" will not be discoverable via DNS due to invalid characters. Valid characters include all alpha-numerics and dashes.
from micro.
The warning is non-issue but if you want to avoid that then you need to specify a service name that matches consul's requirements.
The timeout error mentioned above could be any number of reasons. micro list services
and micro get service foo.example
only query consul while micro query
makes a request to the service itself. It's likely that you have dead entries in consul and its attempting to request one of these. To avoid such an issue you should use the register ttl and interval options. Example here https://github.com/micro/micro/blob/master/examples/greeter/server/main.go#L24L25.
from micro.
The other likely issue could be that your other service is not accessible or registering a local address.
from micro.
Thanks for the reply, will try to define the TTL as well as refresh consul completely. I will close the issue once I have it working if that is OK.
from micro.
That's fine, please test and respond asap if looking to leave the issue open until resolved. Lingering issues unrelated to the code itself is not ideal.
from micro.
No luck, after trying the following -
- Add TTL per your feedback
- Cleared consul data and started with clean slate on both machines A and B
- The server is accessible using public IP, may be the RPC port used for communication is being blocked somehow (checking, not sure) - Can it relate to proxy_address ?
from micro.
Please ensure your service is binding to the publicly accessible IP and attempt to manually connect to it. Are these two machines accessible on a private network? Are they two machines in completely different networks with public interfaces? What address is actually being registered in the service registry? Is that address accessible?
Also note, this is a machine to machine configuration issue rather than Micro itself. You need to ensure that both machines can talk to each other and the address you're binding to or advertising is available from other machines.
from micro.
Both nodes of the consul cluster reside on public facing network and the node2node communication is over WAN gossip. Regarding "What address is actually being registered in the service registry? Is that address accessible?" - Looks like this is the issue -
#micro stats foo.example
service foo.example
version latest
node address:port started uptime memory threads gc
foo.example-19129b57-bc4a-11e6-b092-0cc47ab587da x.x.x.x:34588 0
In the result above, I see that x.x.x.x is actually used from a private network and not from the public network.
I agree that it is non-issue for the micro toolkit.
from micro.
I am reopening this as a question:
I have a Consul Cluster (Server) in a DC say SFO and another Consul Cluster (Server) in another DC say BOS. Both these are joined over wan (consul join -wan ). I can see them connected fine.
I then start a micro service in SFO with registry_address as the the address of SFO consul server.
Using 'http://bos-server:8500/v1/catalog/services?dc=sfo', I can see that the micro service was registered to consul in SFO dc from BOS dc.
When I run 'micro list services' in SFO, I see my micro service listed.
When I run 'micro list services' in BOS, I do not see my micro service listed.
Is there a way I can list/call services running in SFO dc from the server in BOS dc ? Apologies if this has been answered before.
from micro.
I'm sorry but this is a consul specific issue. Micro only abstract consul away as a registry, it does not control the underlying functionality of consul. micro list services
just uses consul.Catalog().Services(nil). You may need to talk to hashicorp about how WAN clustering works.
from micro.
FYI i have similar problems on NATS, so that's not only consul specific...
from micro.
@pawmart Hi, I meet same problems on NATs, have you found any solutions?
from micro.
Related Issues (20)
- grpc error "transport is closing" HOT 5
- Documentation
- Failed to connect to micro server at 127.0.0.1:10012 HOT 2
- Unable to login on a remote server HOT 2
- How to run in production? HOT 6
- Kubernetes Deployment HOT 2
- Context deadline exceeded HOT 2
- server.NewServer use http2 some bug
- 'micro' is not recognized as an internal or external command, operable program or batch file.
- Problems connecting with Windows
- Could not import opentelemetry HOT 2
- How to write KV to a table. HOT 4
- How to update and delete - tables/databases HOT 1
- Postgres Database Connectivity HOT 2
- micro.dev/v4 - module declares its path as: github.com/micro/micro HOT 8
- Releaser build with CGO_ENABLED=0 doesn't run on Mac M1 HOT 1
- ..\..\go\pkg\mod\github.com\!proton!mail\[email protected]\openpgp\ecdh\x25519.go:16:2: //go:build comment without // +build comment HOT 3
- list of bugs i know
- run micro server command error HOT 6
- go: micro.dev/v4/cmd/protoc-gen-micro@latest: version constraints conflict: HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from micro.