-
Notifications
You must be signed in to change notification settings - Fork 2.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can't connect remotely to a server #16
Comments
Thanks for raising the issue. The way in which a service registers, it blindly uses the server listener address provided rather than figuring out the appropriate IP of the machine or allow you to specify and advertising address. The quick fix is to set server.Address("10.0.0.1:8080") to the private ip of the host. I'll put together a more elegant solution that will either allow the separation of listen and advertise address much like consul does. Any thoughts or PRs welcome. |
Thank you @asim , the quick fix worked ! |
I've committed a fix here 0dbe14a. When 0.0.0.0 is specified as the bind address it will extract the private ip and use that for registration. Please close the issue if to satisfaction. |
Not sure if this is the way to do it, but it's not working here
|
I think this line will never evaluate to true |
Does your machine have private ips? |
Yes, 192.168.23.x |
The IPs are assigned on the machine and you can see them if you do ifconfig? |
Yes, I have docker running but that's a different issue
I'm running your code inside the service handler and it works
outputs
|
Did you do go get -u? Perhaps the library was not rebuilt the first time. The behaviour suggests it wasn't updated. |
That was it. Thanks @asim !! |
…ption file store: add DirOption
Hi
I have a client running on 'blackbeard' machine and a server running on 'wopr' machine.
The consul server is running on blackbeard and a consul agent is running on wopr.
This is the consul server
This is the consult agent (client)
This is the server
This is the output of http://localhost:8500/v1/catalog/service/io.jbrodriguez.mediagui.scanner, run on blackbeard
But the client fails to connect to server
If I run the client on wopr, it works
The text was updated successfully, but these errors were encountered: