I am binding consul to a dummy interface 169.254.1.1
using the bind_addr
and the client_addr
is also set to the same. The consul members
command fails on the server. But the curl to API, curl -X GET http://169.254.1.1:8500/v1/agent/members?segment=_all
works. What am I missing or doing wrong?
Oh, I just noticed the http-addr
argument to the consul members command. And this /opt/apps/consul/consul members --http-addr='169.254.1.1:8500'
works. Is that it or is it supposed to work without the argument?
Hi @agarwal-nitesh,
The Consul CLI uses 127.0.0.1:8500
as the default HTTP address. As you identified, you can override this using the -http-addr
flag or the CONSUL_HTTP_ADDR
environment variable. See the following post for more info.
1 Like
This is better. Thanks.