New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
All published services within a docker swarm are unreachable while containers deployed normally work fine. #41825
Comments
Update: I redeployed using Ubuntu 18.04 as my base image, and the same exact setup on that (deployed using ansible) seems to work fine... So this is an issue with the current version of Docker on Ubuntu 20.04. |
What version of docker was installed when things didn't work? v20.10.0 or v20.10.1 ? Are you installing the official packages from download.docker.com or Ubuntu distro packages (packaged by Ubuntu)? I tried reproducing on a Ubuntu 20.04 machine, but so far wasn't able to reproduce the issue.
To narrow down possible issues; this was the same on machines that had a service instance running, as on machines that did not have an instance running? |
Any new developments on this? Projects dependent upon Moby like CapRover are continuing to recommend sticking to 18.04, but it sure would be nice to be able to move onto 20.04 in some scenarios vs sticking to the older release. |
Sorry it took so long to reply. This was on docker version 20.10.1 installed directly from the docker official packages. |
Hmm. I've got a new KVM VPS and installing 20.04 gives me the option in the boot install, to install docker with it. I am now wondering if I should install it and wait to see if I have any problems, or if I should just scuttle the vm and use an 18.04 image instead..although I don't like how close that EoL is. Has there been any updates on whether or not the issue is with 20.04 or with docker yet? |
Is this issue closed? or we need to worry deploying on 20.04? |
wondering of the same |
I have it working (seemingly) with no changes on 20.04 now... Anyone else seeing success? |
Works for me too, thx! |
This is an old issue and appears to be working for some users. I will close it as stale. If you encounter this issue on a current engine release, please open a new issue. |
I've run into an issue that seems similar too this one; https://forums.docker.com/t/cant-access-service-in-swarm/63876. My setup is a little bit different though and I haven't found a solution to my problem yet.
The minimal, reproducible example
Build a swarm cluster between atleast 3 Ubuntu 20.04 docker swarm managers.
Deploy a service
docker service create --name test_web --replicas 3 --publish published=8080,target=80 nginxdemos/hello
Check that the containers and services were created properly and observe the failure of connecting to that service:
The expected result of the first curl command should be a Status 200 Ok.
The detailed report
My setup is 4 nodes in total. They are identical Ubuntu 20.04 KVM virtual machines all on the same network. There are no firewalls between them. I have 3 Managers and 1 Worker (which i've only added as a step during troubleshooting).
I can run a container normally and reach it on the local host fine.
However the same app deployed as a service using the following compose file:
It does not become reachable from any of the hosts at all:
I also don't see any port bindings being made on those hosts at all, so it doesn't look like any ports are being published.
I also can't reach the service while exec'ed into a container for that service. Execing into a container, I'm able to hit the LOCAL app port, however I cannot hit the service by name. The container CAN resolve the service name.
I've also changed the default-addr-pool for the swarm cluster from the original 10.0.0.0/8 network to:
I've gone and made sure that I'm not using any overlapping networks that might be causing this and have gone so far as to completely redeploy the cluster. I've just about exhausted all of my troubleshooting idea's. Any Idea's?
The text was updated successfully, but these errors were encountered: