I'm currenlty trying to connect/join a Linux Docker Swarm cluster with my Windows machine in order to test a stack without sending the stack over and over to my test cluster under Linux. My problem is that I can't join the cluster with my Windows Docker.
My cluster had initially 1 manager and 4 workers. I recently created and added a new manager to it in order to add my Windows Docker node as manager. With this, I shouldn't have any issue with the manager quorum (since my two managers will be always up, and my Windows Docker could be interrupted at any time).
I configured my local firewall - and also on each nodes of my Linux cluster - to accept connections on ports (the following can be found at the end of this documentation) :
- TCP port 2377 for cluster management communications
- TCP and UDP port 7946 for communication among nodes
- UDP port 4789 for overlay network traffic
The advertising network in my cluster is
192.168.0.0/24, one of my manager's IP address is
192.168.0.100 and my PC's IP address is
192.168.0.143 (same network). They can ping each others and I tested the ports defined before.
So, when I perform the
docker swarm join-token manager on a manager I have something like this:
docker swarm join --token SWMTKN-1-27hzpcnek5... 192.168.0.200:2377
If I copy/paste it to my PC:
Error response from daemon: manager stopped: can't initialize raft node: rpc error: code = Unknown desc = could not connect to prospective new cluster member using its advertised address: rpc error: code = DeadlineExceeded desc = context deadline exceeded
But, even with this error, on my cluster, if I run
docker node ls, my node appears in the list:
8380zb5jeke0elwohr7aieke8 linuxkit-00155d00d946 Ready Active
But on my PC Docker thinks that it's not member of a cluster:
Error response from daemon: This node is not a swarm manager. Use "docker swarm init" or "docker swarm join" to connect this node to swarm and try again.
The Docker version is different in the cluster and on my PC:
Could the issue came from this?
N.B.: I work with Bash on Ubuntu on Windows, but the result is the same on PowerShell.
N.B. 2: I don't know if it's useful, but since Docker for Windows uses Hyper-V, I have a NAT interface:
10.0.75.0/24 (and the VM's IP address is
10.0.75.1). I tried to use this interface as advertising address and listening address but the issue returned is the same
Does anybody already encounter this issue? Any ideas?
Disaggreeing with @BMitch's answer, after tests, I don't think there is any issue with the difference between managers' Docker versions.
As I said in my previous comment on BMitch's answer, I had to add the option
--advertise-addr 192.168.0.200 - which is my leader manager address - to the docker join command. Until this, I used
--advertise-addr 192.168.0.143, my PC address.
I hope it will help others.
If I run
docker info on my PC I got this:
Swarm: active NodeID: o9wehjcyhe3n6xxzy1epnhxdp Error: rpc error: code = Unknown desc = The swarm does not have a leader. It's possible that too few managers are online. Make sure more than half of the managers are online. Is Manager: true Node Address: 192.168.0.200 Manager Addresses: 192.168.0.200:2377 192.168.0.200:2377 192.168.0.201:2377
There are two managers with address
I finally gave up and installed a Linux server on another machine in order to join the cluster. That's not what I wanted but I can work now.
If any have information about this issue, I invite you to share it. Thanks :)