Hi,
I’m trying to connect to the Consul server using mDNS provider in cloud auto-join. For mDNS, I’ve install avahi on both server and client. On client, I’m able to ping consul.local
. However, the Consul agent seems to be unable to find the server.
I couldn’t find examples to get this to work. Will someone point me in the right direction?
Thanks.
This is the log.
: ==> Consul agent running!
: 2020-05-22T01:27:56.941Z [INFO] agent: Retry join is supported for the following discovery methods: cluster=LAN discovery_methods="aliyun aws azure digitalocean gce k8s linode mdns os packet scaleway softlayer tencentcloud triton vsphere"
: agent: Retry join is supported for the following discovery methods: cluster=LAN discovery_methods="aliyun aws azure digitalocean gce k8s linode mdns os packet scaleway softlayer tencentcloud triton vsphere"
: 2020-05-22T01:27:56.941Z [INFO] agent: Joining cluster...: cluster=LAN
: agent: Joining cluster...: cluster=LAN
: 2020-05-22T01:27:56.942Z [DEBUG] agent: discover: Using provider "mdns": cluster=LAN
: agent: discover: Using provider "mdns": cluster=LAN
: 2020-05-22T01:27:56.941Z [WARN] agent.client.manager: No servers available
: 2020-05-22T01:27:56.942Z [ERROR] agent.anti_entropy: failed to sync remote state: error="No known Consul servers"
: agent.client.manager: No servers available
: agent.anti_entropy: failed to sync remote state: error="No known Consul servers"
This is the client agent configuration.
{
"datacenter": "dc1",
"data_dir": "/var/lib/consul",
"bind_addr": "{{ GetPrivateInterfaces | include \"network\" \"192.168.5.0/24\" | attr \"address\" }}",
"client_addr": "0.0.0.0",
"advertise_addr": "{{ GetPrivateInterfaces | include \"network\" \"192.168.5.0/24\" | attr \"address\" }}",
"log_level": "DEBUG",
"enable_syslog": true,
"acl_enforce_version_8": false,
"retry_join": [
"provider=mdns service=consul v6=false"
]
}