Consider the following setup:
Three hosts in the same network:
- Host A - SLES
- Host B - Ubuntu
- Host C - Ubuntu
Then, the following has worked:
- Init swarm on A
- Join swarm at B, make B a manager
The following is however not working:
- Join swarm at C as worker with token issued from A
- Join swarm at C as worker with token issued from B
In both cases we get the same error:
Error response from daemon: could not find local IP address:
dial udp: address udp/2377: unknown port
Honestly, I have even no idea how to interpret this message.
Any ideas?..
UPD. nmap results for ports 2377,4789,7946 (hint from Felipe in a comment below) - no idea what are they good for but now it is clear that something is wrong with host C.
Host A (Primary manager)
PORT STATE SERVICE
2377/tcp open unknown
4789/tcp closed unknown
7946/tcp open unknown
Host B (Secondary manager)
PORT STATE SERVICE
2377/tcp open unknown
4789/tcp closed unknown
7946/tcp open unknown
Host C (should become a worker)
PORT STATE SERVICE
2377/tcp closed unknown
4789/tcp closed unknown
7946/tcp closed unknown
Host D (successfully added as a worker)
PORT STATE SERVICE
2377/tcp closed unknown
4789/tcp closed unknown
7946/tcp open unknown
Finally, with host B there is the actual problem.
- swarm init => OK; port 2377 is open
- swarm leave => port is closed again
- swarm join => error "port not found"