Init could not choose ip address error while doing docker swarm init

0 votes

I've recently started learninf docker swarm and i was experimenting while i came across the following error

Error response from daemon: could not choose an IP address to advertise since this system has multiple addresses

command that caused this error:

docker-machine create -d virtualbox node-1
docker-machine create -d virtualbox node-2
docker-machine create -d virtualbox node-3

eval $(docker-machine env node-1)

docker swarm init \
    --secret my-secret \
    --auto-accept worker \
    --listen-addr $(docker-machine ip node-1):2377

Whats happening?

Aug 23, 2018 in Docker by lina
• 8,110 points
308 views

1 answer to this question.

0 votes

First look for the public IP of your machine on your network

ifconfig

Add the IP address to your init statement like this:

docker swarm init --advertise-addr 192.1.68.1.x
answered Aug 23, 2018 by Nilesh
• 6,880 points

Related Questions In Docker

0 votes
1 answer
0 votes
1 answer

Docker ports are working on the localhost but not with public ip

Probably, the reason is that you've included ...READ MORE

answered Jun 12, 2018 in Docker by Damon Salvatore
• 5,510 points

edited Oct 15, 2018 by Kalgi 288 views
0 votes
1 answer

How to obtain the Docker container's IP address from the host?

This can be done by executing the ...READ MORE

answered Jul 16, 2018 in Docker by Sophie may
• 9,850 points
639 views
0 votes
1 answer
+5 votes
7 answers

Docker swarm vs kubernetes

Swarm is easy handling while kn8 is ...READ MORE

answered Aug 27, 2018 in Docker by Mahesh Ajmeria
1,023 views
0 votes
1 answer

Access IP address of Couchbase container on Docker Swarm cluster

The property .NetworkSettings.Ports is a map, not a struct. ...READ MORE

answered Aug 24, 2018 in Docker by Nilesh
• 6,880 points
83 views
0 votes
1 answer

Error while trying to run an image - Docker

This error means that the container tries ...READ MORE

answered Aug 22, 2018 in Docker by Nilesh
• 6,880 points
1,615 views