-
Notifications
You must be signed in to change notification settings - Fork 494
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
Unhealthy maildev container in docker compose #484
Comments
Same issue here. It works for me locally (MacOS) and appears healthy. At CI though I receive the same "MailDev SMTP Server running at 0.0.0.0:1025" success message, but the container still shows as unhealthy. Can it be something related to changes in docker daemon or something like that? Also, maildev/maildev image hasn't changed in 8 months apparently |
@pallost Seems that its docker related, my services are also having weird dns issues, and they cannot resolve any address |
For us:
I ended up removing maildev from the docker compose setup because realized that we do not need it (yet) for our e2e tests. The sidecar version without any environment variables still works and can be used with the unit tests. I absolutely don't think this is related to maildev, really feels like there's some networking issue within the docker service itself. Good luck for further debugging! |
Downgrade docker-ce to older release (25.0.5) fix the issue. |
Same issue. As a workaround I put following in the docker compose file: healthcheck:
test: 'wget -O - http://127.0.0.1:$${MAILDEV_WEB_PORT}$${MAILDEV_BASE_PATHNAME}/healthz || exit 1' |
Got same issue, seems more a recent bugfix in docker that starts to use the planned default healthcheck configured in the image. Healthcheck configured doesn't work and docker does its job:
I couldn't find any wget call that returns 200 code after beeing called a second time (always says this strange error can't open ...). My fix was to force disabling healthcheck like this:
If you use docker compose up -d --wait command, you have to fake a healthy check. This could be performed like this:
|
Root cause is tracked here: #474 |
@zguig52 I think my specific issue is different from the one you mentioned, mine seems to be related to docker itself and some update in |
@Nikola-Milovic , got this also when upgrading Rocky 9 to latest docker:
I got other issues with curl/wget localhost configured healthchecks. I had to replace localhost with 127.0.0.1. Other communications are based on self defined extra_hosts. Seems there is also something with DNS resolution in this version. |
Could be related to this issue: moby/moby#47414 I had also some weird transient behavior recently even before this upgrade with v25 where sometimes my containers where unable to communicate between them after restart and I had to destruct them to restart them (multiple networks attached with self configured IPs through IPAM module). I saw that they did not had all networks instantiated thus not listening on expected IPs. |
I can confirm that it does not work with The root cause is that the wget (for healthcheck) tries ipv6 to connect. From within the maildev container:
Once can confirm that using telnet (after installing it):
|
Same problem, and also related to localhost being translated as ipv6 instead of ipv4... |
I've also defined my health check to support a self-signed certificate to run it over https: healthcheck:
test: wget --no-check-certificate --user-agent='Docker healthcheck' -O /dev/null https://localhost:1080/healthz || exit 1
interval: 10s
timeout: 1s Not a big deal, but it might be worth adding it to the documentation? |
This issue is also present on Docker 20.10.24+dfsg1 (Debian 12) when IPv6 is manually enabled. It's possible to reproduce it by placing the following lines in your {
"ipv6": true,
"fixed-cidr-v6": "fd00::/64"
} Maildev currently listens on IPv4 only:
Maybe it should listen on IPv6 too |
is this fixed on laster image? |
nop |
My docker compose file
Docker Compose version v2.25.0
My maildev stopped being tracked by traefik since I updated docker compose, so it might be related not sure. A bit of debugging and I found that the container is unhealthy. Considering how barebones my setup is, I am guessing its something related to maildev itself
Can someone try and confirm that its working or not working for them as well?
The text was updated successfully, but these errors were encountered: