==> Multiple private IPv4 addresses found. Please configure one (1.0.1)

4,582 views
Skip to first unread message

Dick Lieber

unread,
Nov 28, 2017, 11:58:33 AM11/28/17
to Consul

I'm tying to run a consul agent in AWS ECS (docker) and get:


==> Multiple private IPv4 addresses found. Please configure one


I'm providing both -advertise=10.127.20.47 and -bind=10.127.20.47


Any ideas?


Mircea Mihai Costache

unread,
Nov 29, 2017, 2:11:15 AM11/29/17
to Consul
I cloud be wrong... If you run consul in docker container and that container is not connected to host network then you cannot bind to the host IP address. You can bind to the docker container IP instead (usually they are like 172.18.x.x).

Maybe if you run : docker run --net=host your_app   then you can bind to 10.127.20.47?

Dick Lieber

unread,
Nov 30, 2017, 8:34:23 AM11/30/17
to Consul
already have --net=host

Mircea Mihai Costache

unread,
Dec 1, 2017, 2:14:52 AM12/1/17
to Consul
How about using also the CONSUL_BIND_INTERFACE. Kind of disappointed by hashicorp documentation and community support here . Hashicorp does great job to develop tools but as many programmers do, they don't like to write documentation and the community is not very responsive here.

""The entry point also includes a small utility to look up a client or bind address by interface name. To use this, set the CONSUL_CLIENT_INTERFACE and/or CONSUL_BIND_INTERFACE environment variables to the name of the interface you'd like Consul to use and a -client=<interface ip> and/or -bind=<interface ip>argument will be computed and passed to Consul at startup.""

Preetha Appan

unread,
Dec 2, 2017, 10:52:50 AM12/2/17
to Consul
Can you provide the full docker run command you have? I just tried it two different ways as shown below and both worked. 

docker run -d --net=host consul agent -bind=X.X.X.X -client=X.X.X.X  - this specifies the bind and client address directly

docker run -d -e CONSUL_CLIENT_INTERFACE='eth0' -e CONSUL_BIND_INTERFACE='eth0' - This binds to 172.17.X.X using environment variables to specify the docker interface name (eth0) like Mircea said below.
Reply all
Reply to author
Forward
0 new messages