docker / for-win

Bug reports for Docker Desktop for Windows
https://www.docker.com/products/docker#/windows
1.86k stars 290 forks source link

Docker Swarm containers are not having outbound/external connectivity in windows server 2022 #13997

Open dilip3710 opened 7 months ago

dilip3710 commented 7 months ago

Description

We are setting up the Docker Swarm Orchestration in the Windows server 2022 (Version 21H2 and OS Build:20348.2340) with MS SQL Server (2022) and Docker Engine version (25.0.3). We are using .NetCore 8.0, RabbitMQ (For Message Queuing) and docker-compose files. Each application is deployed as a Microservice.

Issue Description: We initialized the Swarm (Single Manager node) with VM IP address and it run in Windows server 2022. We deployed the services using command - docker stack deploy docker-compose.yml .We can see the docker service got created with replicated status (1/1) and all the containers are launched successfully (in swarm overlay network) However we cannot see any outbound connectivity/external traffic from docker swarm containers. It is unable to communicate even to localhost,1433 SQL port or any other ports. We have tested using Test-NetConnection -ComputerName -Port 1433 command by running the swarm container. Even swarm containers are showing UP status , It is not working as expected and seeing failures on SQL connectivity and others .(from docker logs <container_name). We also found the swarm containers are not using WinNAT/NAT network for External connectivity. Please help us to resolve this issue

Steps we tried: Added required firewall connectivity for swarm setup with TCP and UDP ports opened Created overlay network for swarm services and use that network for deploying docker swarm 3)Added required Firewall for SQL Server- port 1433 and also RabbitMQ. Non Swarm Container are running fine in same windows 2022 server and it is using NAT network for outbound connectivity

Note: We also have same setup running successfully in Windows server 2016 with SQL server 2016 and Docker Version 20.10.9. In that 2016 server , we can see the swarm containers are using ‘WinNAT’ network/vEthernet NIC adapter for the Outbound connectivity but same step is missing in the 2022 server.

Reproduce

Install latest docker engine (25.0.3 version) in Windows server 2022 Docker swarm init --advertise-addr Docker stack deploy docker-compose.yml Docker service ls Docker Container ls docker exec -it Powershell

Test-NetConnection -ComputerName -Port 1433 OR Ping www.google.com Above command is failing with Timeout error

Expected behavior

Docker Container ls docker exec -it Powershell

Test-NetConnection -ComputerName -Port 1433 OR Ping www.google.com Above TCP Ping command should succeed

docker version

25.0.3

docker info

25.0.3

Diagnostics ID

NA

Additional Info

No response

voonyee commented 6 months ago

Hi,

Docker Swarm used to be part of Docker EE, but Docker Enterprise (aka “Docker EE”) is no longer owned by Docker, Inc. It is owned by Mirantis: https://www.mirantis.com/software/swarm/

If you have questions regarding Docker Enterprise or are interested in evaluating Docker Enterprise, please contact Mirantis directly: https://info.mirantis.com/contact-us