I am getting this error when I am running any "consul members" on consul server and clients. The port is in LISTENING state and I made sure there is no firewall blocking. I get this error when in run the same in the consul client:
Error retrieving members: Get http://127.0.0.1:8500/v1/agent/members:
dial tcp 127.0.0.1:8500: connectex: No connection could be made because the target machine actively refused it.
When I make the above request with the private IP, I get the required output. Can I change the configuration anywhere so that it listens on the private IP for requests?
It seems that your
consul memberslacks the option-http-addr=....Example
consul members -http-addr=10.10.10.10:8500while assuming you use the standard port
8500of the consul agent and that you started consul via:consul agent -client=10.10.10.10 #...Where to find the documentation?
In the Consul Documentation under Running an Agent: "Client Addr":
Or offline via
consul members -help: