简体   繁体   中英

Docker Swarm overlay network - containers can’t communicate

Tl;dr: Docker swarm containers using overlay network can't ping eachother

I am trying to create a swarm, which includes my Desktop (Windows with Docker Desktop) and a Ubuntu VM (Swarm manager, on my Desktop PC).

Creating the swarm and joining it works fine. I proceded to create an attachable overlay network, which should span all my nodes using the overlay driver. I have created a random nginx service, using global mode and my overlay network to make the network available on all my nodes.

To test the connectivity I created two ubuntu containers (One on Ubuntu, one on my Windows) and joined them to the network. The Problem is that the containers can't ping eachother.I have also opened the required ports for swarm (2376, 2377, 7946, 4789) on my Windows and Ubuntu VM.

Docker version for Linux:

Version: 19.03.6 API version: 1.40 Go version: go1.12.16

Docker version for Windows:

Version: 19.03.5 API version: 1.40 Go version: go1.12.12

Do you know how I can make the connection work?

Found your question as I am in a similar scenario.

The documentation states that overlay networks are encrypted by default and that you shouldn't attempt to attach Windows nodes to an encrypted network:

Do not attach Windows nodes to encrypted overlay networks.

Overlay network encryption is not supported on Windows. If a Windows node attempts to connect to an encrypted overlay network, no error is detected but the node cannot communicate.

https://docs.docker.com/network/overlay/#encrypt-traffic-on-an-overlay-network

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM