I've got a mixed Docker Swarm Cluster with Linux machines and Win7 machines running VirtualBox via NAT (bridged option is not allowed).
Win7 Win7
| |
(port forwarding on 7946tcp/udp, 2377tcp, 4789udp)
| |
+----+----+ +----+----+ +-------+ +-------+
| VirtBox | | VirtBox | | linux | | linux |
+----+----+ +----+----+ +---+---+ +---+---+
| | | |
+----+---+ +----+---+ +----+---+ +----+---+
| docker | | docker | | docker | | docker |
+----+---+ +----+---+ +----+---+ +----+---+
| | | |
+----+------------+-----------+------------+---+
| docker swarm |
+----------------------------------------------+
Docker swarm is initialized ok (as per the chart bellow):
docker@frankie:~$ docker node ls
ID HOSTNAME STATUS AVAILABILITY MANAGER STATUS ENGINE VERSION
ban0an8sg * Win1 Ready Active Reachable 18.05.0-ce
asdlkj328 Win2 Ready Active Leader 18.05.0-ce
9w05zyye6 Linux1 Ready Active Reachable 18.03.1-ce
slkhj2387 Linux2 Ready Active Reachable 18.03.1-ce
I can launch services to the swarm without issues:
docker@frankie:~$ docker service ls
ID NAME MODE REPLICAS IMAGE PORTS
9w05zyye6 my-web replicated 1/1 nginx:latest *:8083->80/tcp
Unfortunately swarm mesh only works between Linux machines. I can access the service directly on the machine it is running (even if service is running on a windows) but the network mesh only works between Linux.
accessible on ► | win1 | win2 | lin1 | lin2
running on ▼ +------+------+------+------
win1 | x | | |
win2 | | x | |
linux1 | | | x | x
linux2 | | | x | x
Any idea on where the problem might be?
Edit (added ports add command for clarification):
VBoxManage.exe controlvm "win1" natpf1 "docker-swarm-cluster-management,tcp,0.0.0.0,2377,,2377"
VBoxManage.exe controlvm "win1" natpf1 "docker-swarm-cluster-comm-tcp,tcp,0.0.0.0,7946,,7946"
VBoxManage.exe controlvm "win1" natpf1 "docker-swarm-cluster-comm-udp,udp,0.0.0.0,7946,,7946"
VBoxManage.exe controlvm "win1" natpf1 "docker-swarm-cluster-traffic,udp,0.0.0.0,4789,,4789"