Hello, I’ve been unable to resolve this error when connecting my local agent to the cluster: [ERROR] agent.anti_entropy: failed to sync remote state: error="No known Consul servers"
Here is the command I’m using:
consul agent -retry-join=‘provider=k8s label_selector=“app=consul,component=server”’ -data-dir=/tmp/consul
When I run “consul members” it returns the correct member list
I have exposed the following:
server:
** exposeGossipAndRPCPorts: true**
client:
** enabled: true**
** grpc: true**
** exposeGossipPorts: true**
Here is the complete output of the “consul agent” command:
==> Starting Consul agent…
Version: ‘1.8.4’
Node ID: ‘23eb4355-a05b-74c1-a50b-63bb62708f3d’
Node name: ‘mjw.local’
Datacenter: ‘dc1’ (Segment: ‘’)
Server: false (Bootstrap: false)
Client Addr: [127.0.0.1] (HTTP: 8500, HTTPS: -1, gRPC: -1, DNS: 8600)
Cluster Addr: 192.168.1.25 (LAN: 8301, WAN: 8302)
Encrypt: Gossip: false, TLS-Outgoing: false, TLS-Incoming: false, Auto-Encrypt-TLS: false
==> Log data will now stream in as it occurs:
2021-02-17T17:11:35.646-0800 [WARN] agent: Node name "mjw.local" will not be discoverable via DNS due to invalid characters. Valid characters include all alpha-numerics and dashes.
2021-02-17T17:11:35.651-0800 [WARN] agent.auto_config: Node name "mjw.local" will not be discoverable via DNS due to invalid characters. Valid characters include all alpha-numerics and dashes.
2021-02-17T17:11:35.651-0800 [INFO] agent.client.serf.lan: serf: EventMemberJoin: mjw.local xxx.xxx.x.xx
2021-02-17T17:11:35.651-0800 [INFO] agent.router: Initializing LAN area manager
2021-02-17T17:11:35.651-0800 [INFO] agent: Started DNS server: address=127.0.0.1:8600 network=tcp
2021-02-17T17:11:35.652-0800 [INFO] agent: Started DNS server: address=127.0.0.1:8600 network=udp
2021-02-17T17:11:35.652-0800 [INFO] agent: Started HTTP server: address=127.0.0.1:8500 network=tcp
2021-02-17T17:11:35.652-0800 [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"
2021-02-17T17:11:35.652-0800 [INFO] agent: Joining cluster...: cluster=LAN
2021-02-17T17:11:35.652-0800 [DEBUG] agent: discover: Using provider "k8s": cluster=LAN
2021-02-17T17:11:35.652-0800 [INFO] agent: started state syncer
==> Consul agent running!
2021-02-17T17:11:35.652-0800 [WARN] agent.router.manager: No servers available
2021-02-17T17:11:35.652-0800 [ERROR] agent.anti_entropy: failed to sync remote state: error=“No known Consul servers”
Also, I’ve been following the instructions here, but I still cannot resolve the “no servers found” error ( Consul Clients Outside of Kubernetes - Kubernetes | Consul by HashiCorp )
any suggestions are appreciated…
thanks,
michael