I’m having troubles to find which advertise address the manager should use to work with the following setup:
The problem is that if I use the default options of docker swarm init
on the host, I can’t get my docker machine to connect to this swarm using the connection string returned by the init
above.
user@host$ docker swarm init
Swarm initialized: current node (9cv0khu88hdq7wsdqlzqpj7e0) is now a manager.
To add a worker to this swarm, run the following command:
docker swarm join --token SWMTKN-1-2qx019269giy7jsnehqukpgjz9pqfe7ifprd0evcyi3ef1d699-7c1jig60by75lpuh5pjg5wuy8 192.168.65.2:2377
To add a manager to this swarm, run 'docker swarm join-token manager' and follow the instructions.
user@host$ docker-machine ssh my-vm-1
## .
## ## ## ==
## ## ## ## ## ===
/"""""""""""""""""\___/ ===
~~~ {~~ ~~~~ ~~~ ~~~~ ~~~ ~ / ===- ~~~
\______ o __/
\ \ __/
\____\_______/
_ _ ____ _ _
| |__ ___ ___ | |_|___ \ __| | ___ ___| | _____ _ __
| '_ \ / _ \ / _ \| __| __) / _` |/ _ \ / __| |/ / _ \ '__|
| |_) | (_) | (_) | |_ / __/ (_| | (_) | (__| < __/ |
|_.__/ \___/ \___/ \__|_____\__,_|\___/ \___|_|\_\___|_|
Boot2Docker version 17.10.0-ce, build HEAD : 34fe485 - Wed Oct 18 17:16:34 UTC 2017
Docker version 17.10.0-ce, build f4ffd25
docker@my-vm-1$ docker swarm join --token SWMTKN-1-2qx019269giy7jsnehqukpgjz9pqfe7ifprd0evcyi3ef1d699-7c1jig60by75lpuh5pjg5wuy8 192.168.65.2:2377
Error response from daemon: Timeout was reached before node joined. The attempt to join the swarm will continue in the background. Use the "docker info" command to see the current swarm status of your node.
Okay, this is probably dumb to hope that it will work without any options but… How am I supposed to know which interface my swarm’s manager should listen?
Thank you for your time, have a nice day
Alex
Footnote: I’ve posted the same question on ServerFault