I have setup docker manually on windows server 2016 by following this article https://docs.docker.com/ee/docker-ee/windows/docker-ee/
I have two windows server 2016 hyper-v machines sharing the same network and I added firewall rules to allow network connectivity form each one to the other.
The first machine holds the private IP 192.168.192.254 and the other one holds the private IP 192.168.192.242 and they can ping each other.
I have tried to init swarm on the first machine and used the below command docker swarm init --advertise-addr 192.168.192.245:2377 --listen-addr 192.168.192.245:2377
but I got the below error
*
Error response from daemon: manager stopped: failed to listen on remote API address: listen tcp 192.168.192.245:2377: bind: The requested address is not valid in its context.
* I executed the below command then
docker network inspect nat
Looks like the docker has its own interface and its network IP is different than the hyper-v default switch! This means that both dockers on the both machines do not know how to communicate with each other, if my understanding is correct, how can I build multi node swarm with this situation?
The other thing I have tried to do and failed with, is to init the swarm and used an IP address within the range of the docker window but I got the same issue
Edit Again:
Now it worked with this IP:Port 192.168.192.243:2377 and was able to add the first hyper-v VM as a manager node but as you see the other machine can't join the swarm. I have noticed that when I add --listen-addr 192.168.192.243:2377 I get the same error like above.
I have also disabled firewalls on both machines but nothing is working