-
Notifications
You must be signed in to change notification settings - Fork 5.3k
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
Host name lookup failure
or missing networks when using multiple networks
#10777
Comments
Heyo. We just ran into this. The container is only added to one network, so dns doesn't resolve. Appears to be a regression |
Wanted to point out that we hit this as well in our application when Docker Desktop updated to Docker Compose Our application uses different networks to isolate our NGINX container from the database. Our backend sits on both networks (frontend and database) and could not resolve the database host name from the database network. Our deployments on Ubuntu 22.04 using Docker Compose 2.18.1 seem to still function properly. |
We have also faced this exact problem... nginx is using two networks api and app.. one of the docker networks fails to resolve the api host name. Doing a docker compose down then up seemed to resolve the failure, this is not ideal. |
Had to revert over the weekend to 2.18.1. One of the four containers replicated wouldn't join the postgres network, though all would connect to the main Traefik network fine. |
+1 here, was wracking my brain for hours yesterday trying to figure out why my containers weren't in the networks I specified for them. |
Got same problem. Postgres service on docker network fails to be recognized randomly. |
I ran into this issue quite a bit on the 2.19.1 official Debian Bookworm package ( |
@milas I'm curious, is there any ETA/plan on publishing a new release with this fixed, such as a One of the challenges we have is that it's hard (not possible?) to roll back Docker Desktop installs (which contain a bundled version of Compose), so our devs running on Mac can't easily roll back to Thanks. |
We've spent two days debugging this after our deployments suddenly broke. We realised that some containers were intermittently not connecting to one of the multiple networks they should be connected to; usually it was a our storage/db network, which fails pretty catastrophically. That led me here, to the compose Github, and this issue. |
A fix has been released for this: https://github.com/docker/compose/releases/tag/v2.20.0 @johnthagen It's possible to temporarily override the version of Compose in Docker Desktop. (It will be overwritten on the next Docker Desktop upgrade.) curl -L -o /tmp/docker-compose 'https://github.com/docker/compose/releases/latest/download/docker-compose-darwin-aarch64' && \
mv /tmp/docker-compose "${HOME}/.docker/cli-plugins/docker-compose" && \
chmod +x "${HOME}/.docker/cli-plugins/docker-compose" && \
docker compose version |
Yay, docker-compose v2.20.0 solves as well. |
Work around the bug[1] in docker-compose-plugin v2.19.1, which is included in the current github actions ubuntu 20.04 runner image[2]. [1] docker/compose#10777 [2] actions/runner-images#7916 Part of #6998
Host name lookup failure
when using multiple networksHost name lookup failure
or missing networks when using multiple networks
This bug made me question my sanity for a few days. |
IIRC it was introduced in 2.18.1 or 2.19.0. Nicely fixed in 2.20.0. |
If you look at the Releases, you'll note that it was introduced in 2.19.0 and fixed in 2.20.0. |
I'm now doing yum/dnf versionlock on the docker-compose rpms due to decision for this known bug being released. It took several weeks for it to then be fixed and then filter down into the rpm repos. I had major concerns over "known" bugs being pushed to releases. |
@johnthagen |
@hubertgrzeskowiak From my experience, I can tell you that we used |
I'm on
I'm facing this bug. I'm on Windows. |
Originally posted by @ToshY in #10668 (comment):
@milas While this seems to fix the
not connected to network
issue, it gave me aforward host lookup failed: Host name lookup failure
in return when runningwaisbrot/wait
withdocker compose run
.Example
The text was updated successfully, but these errors were encountered: