Why do I get this warning?

Aug 02 10:07:26 dev1 consul[15743]: 2021-08-02T10:07:26.770-0700 [INFO]  agent: (LAN) joining: lan_addresses=["10.1.96.3 10.1.96.4 10.1.96.5"]
Aug 02 10:07:26 dev1 consul[15743]: 2021-08-02T10:07:26.780-0700 [WARN]  agent.client.memberlist.lan: memberlist: Failed to resolve 10.1.96.3 10.1.96.4 10.1.96.5: lookup 10.1.96.3 10.1.96.4 10.1.96.5: no such host
Aug 02 10:07:26 dev1 consul[15743]: 2021-08-02T10:07:26.780-0700 [WARN]  agent: (LAN) couldn't join: number_of_nodes=0 error="1 error occurred:
Aug 02 10:07:26 dev1 consul[15743]:         * Failed to resolve 10.1.96.3 10.1.96.4 10.1.96.5: lookup 10.1.96.3 10.1.96.4 10.1.96.5: no such host
Aug 02 10:07:26 dev1 consul[15743]: "
Aug 02 10:07:26 dev1 consul[15743]: 2021-08-02T10:07:26.780-0700 [WARN]  agent: Join cluster failed, will retry: cluster=LAN retry_interval=30s error=<nil>

when I do ‘consul members’ I get

Node           Address          Status  Type    Build   Protocol  DC   Segment
nomadserver1   10.1.96.3:8301   alive   server  1.10.1  2         nyc  <all>
nomadserver2   10.1.96.4:8301   alive   server  1.10.1  2         nyc  <all>
nomadserver3   10.1.96.5:8301   alive   server  1.10.1  2         nyc  <all>
app1           10.1.96.6:8301   alive   client  1.10.1  2         nyc  <default>
app2           10.1.96.7:8301   alive   client  1.10.1  2         nyc  <default>
dev1           10.1.96.8:8301   alive   client  1.10.1  2         nyc  <default>
loadbalancer1  10.1.96.9:8301   alive   client  1.10.1  2         nyc  <default>
nfs1           10.1.96.10:8301  alive   client  1.10.1  2         nyc  <default>
www1           10.1.96.11:8301  alive   client  1.10.1  2         nyc  <default>

It looks like everyone is alive and healthy? Is this telling me that there is no dns resolution to the listed IP’s? I do have these ip listed in /etc/hosts and I am running dnsmasq for dns resolution. Do I need to worry about these warnings?

Brad

Hi @bradley,

You are getting this error due to the way you have passed the retry_join hosts to the Consul Agent. Consul has received the whole set of IPs as a single hostname, and it is trying to resolve the same.

If it had received the IPs as separate, the lan_addresses list would have been as shown below (comma separated) in the logs.

[INFO]  agent: (LAN) joining: lan_addresses=["10.1.96.3, 10.1.96.4, 10.1.96.5"]

Please fix the value for retry_join and you should be fine.

I found your Consul config from the other topic you posted. You have to fix the retry_join option by adding , between the IP addresses.

retry_join = ["10.1.96.3", "10.1.96.4", "10.1.96.5"]

Boy I feel silly now… but thanks for helping out.

Brad