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,220 points

1 answer to this question.

0 votes

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


Add the IP address to your init statement like this:

docker swarm init --advertise-addr
answered Aug 23, 2018 by Nilesh
• 7,040 points

Related Questions In Docker

0 votes
1 answer

Docker image of maven returns this error - could not create local repository

Instead of mounting the root/.m2 folder to ...READ MORE

answered Aug 10, 2018 in Docker by Sophie may
• 10,550 points
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,980 points

edited Oct 15, 2018 by Kalgi 2,526 views
+2 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
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
• 7,040 points
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
• 7,040 points