-
Notifications
You must be signed in to change notification settings - Fork 4.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
No name resolution at advertise parameter #1185
Comments
Doesn't this require consul to be aware of NSS in order to be able to find the address on LDAP? Why not just use |
"Address" in this case is shorthand for "IP address" since Consul doesn't presuppose the existence of other DNS servers. @aidanhs method would work, or look up the address via some other method like checking the interfaces. |
Sorry in the last command line the ip address after -advertise was missing. -> consul agent -node consul-s1 -bind consul-s1 -advertise 10.10.10.10 -config-file /home/consul/cfg/consul.cfg (ip only for example because I have currently no access to server) What surprises me is that the name resolution is working at the -bind parameter? The 'problem' also exists when the hostname is configured in /etc/hosts |
I'm going to close this out - we have documented these as addresses and don't intend to support host lookups in here (even if the path in Go happens to support them). |
Would this have an effect in case servers changed IP addresses? As in, does this effectively control how do consul nodes reach out to each other (the member list)? |
Yes, if IP changed (because of dhcpclient, a point-to-point protocol, for instance pppoe), then Consul still listening old IP address. This is true when -bind=IP provided.
But, anyway other Consul servers can not connect to this server. So pointed solution: A solution is a wrapper, which periodically checks interface's IP address and restart Consul when IP changed. |
Consul handling IP address changes is tracked under #1580. |
I understand the problem with the private addresses for the bind parameter so I start the consul agent with the -bind paramter but with this I get an error for the advertise address
-> consul agent -node consul-s1-bind consul-s1 -config-file /home/consul/cfg/consul.cfg
==> WARNING: It is highly recommended to set GOMAXPROCS higher than 1
==> Starting raft data migration...
==> Starting Consul agent...
==> Error starting agent: Failed to start Consul server: Failed to start lan serf: Failed to parse advertise address!
The documentation says:
-advertise - The advertise address is used to change the address that we advertise to other nodes in the cluster. By default, the -bind address is advertised.
So ok I tried to tell him the same address as the bind address but it still not working:
-> consul agent -node consul-s1 -bind consul-s1 -advertise consul-s1 -config-file /home/consul/cfg/consul.cfg
==> WARNING: It is highly recommended to set GOMAXPROCS higher than 1
==> Starting raft data migration...
==> Starting Consul agent...
==> Error starting agent: Failed to parse advertise address: consul-s1
The name consul-s1 is resolved via LDAP and is pingable on the os (Linux/SLES 11). The node only starts when I commit the ip address to the advertise parameter.
-> consul agent -node consul-s1 -bind consul-s1 -advertise -config-file /home/consul/cfg/consul.cfg
The text was updated successfully, but these errors were encountered: