Docker Community Forums

Share and learn in the Docker community.

Debian 11 not working in swarm overlay attached network

Debian 11 not working as worker in overlay attachable network.
Tested on WMware VM-s. All VM-s have 2 ETH interfaces. First interface for accessing VM-s for management and second interface for swarm traffic between master and nodes.

SWARM MASTER with ubuntu sshd container:
Centos 7 swarm master with overlay network and 2 ETH interfaces:
docker network create --driver overlay --attachable test_net
Test container:

docker run --name ubuntusshd --network test_net -it ubuntu /bin/bash
apt update
apt install openssh-server

SWARM WORKER with ubuntu ssh client:
Debian 11 with 2 interfaces and swarm member joined to (Centos7) swarm:
Test container:

docker run --name ubuntu --network test_net -it ubuntu /bin/bash
apt update
apt install iputils-ping nmap ssh

Swarm overlay network is up and running.
from Debian 11 container “ubuntu” i can ping “ubuntusshd”.
I cannot connect with ssh to ubuntusshd port 22.
Nmap found open 22 port.

If I make same swarm worker member with base system Debian 10 (or Centos 7 or ubuntu 20.04) all working as expected. I can connect with ssh from container “ubuntu” to “ubuntusshd”.
In fact there are no difference which service i run in ubuntusshd container - with Debian 11 as base system I cannot connect to service trough swarm network.

With Debian 10 all working but after upgrading to Debian 11 connection stop working. I can only ping container.

Any ideas?

How do you start the SSH service inside the container? Is the daemon running in the Debian 11 container?

Note: Please, use the code block button </> when you insert codes. I edited your post.

Hi,

In ubuntu sshd is started automatically after install.
for checking:

sudo systemctl status ssh

for start:

sudo systemctl start ssh

But it is not relevant question because swarm slave built on Debian 10 is working OK and swarm master with sshd container on Centos7 are always same.
After I upgrade Debian 10 slave base to Debian 11, I cannot connect any more to sshd container via swarm attachable network.

Meelis

On a host, yes, but not in a container. There is no systemd in the most of the base images. Even if you install openssh-server and systemd as a dependency in a running container systemd won’t be the first process (PID 1) so systemctl status ssh won’t work.

I disagree because if I don’t completely understand what you are doing, there is a chance I try to solve something that is not a problem at all. So was your first example with the Ubuntu container on the master just an example without using the same image or commands as you used in reality?

I think it matters because there could be something on the server side incompatible with somne of the clients. Have you tried to connect without swarm overlay on a bridge network?

Believe me, sshd is working on master well.
As I described, same setup with Debian10 on base as worker is OK.
In fact if I make swarm master node and 4 workers (Debian 10, Debian 11, Ubuntu 20.04 and Centos 7), only Debian 11 node not communicate with sshd. All other listed system communicate with sshd.

Meelis