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
3,483 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
• 7,060 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,620 points
5,562 views
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 4,188 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
3,925 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
• 7,060 points
1,011 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
• 7,060 points
12,322 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP