Problem initiating Docker Swarm!
By Emma Payne •
Here i am trying to initiate docker swarm but when i am trying to initiate Docker Swarm i get this error below:
[lör jul 04 13:39:15] Jonathan@Whats next?:~$ sudo docker swarm init
[sudo] password for jonteyh:
Error response from daemon: could not choose an IP address to advertise since this system has multiple addresses on interface wlo1 (fdaa:bbcc:ddee:0:380a:17d2:ce59:aed3 and fdaa:bbcc:ddee:0:ec7a:ccd0:18b8:d9bf) - specify one with --advertise-addr 1 Answer
Your host has multiple IP addresses, so you need to specify one IP address for the swarm advertising purposes:
sudo docker swarm init --advertise-addr <IP_address>
See this example from the docker docs:
docker swarm init --advertise-addr 192.168.99.121
Swarm initialized: current node (bvz81updecsj6wjz393c09vti) is now a manager.
To add a worker to this swarm, run the following command: docker swarm join \ --token SWMTKN-1-3pu6hszjas19xyp7ghgosyx9k8atbfcr8p2is99znpy26u2lkl-1awxwuwd3z9j1z3puu7rcgdbx \ 172.17.0.2:2377
To add a manager to this swarm, run 'docker swarm join-token manager' and follow the instructions.I recommend using the IP address connected to the subnetwork from which you can reach the other worker nodes.