Comments (16)
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'
from maildev.
@Nikola-Milovic , got this also when upgrading Rocky 9 to latest docker:
docker --version
Docker version 26.0.0, build 2ae903e
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.
from maildev.
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
from maildev.
@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 v26.0
(since for me more than maildev and healthcheck are affected). But I am leaving the issue open since others seem to have similar issues
from maildev.
I can confirm that it does not work with Docker version 26.0.0, build 2ae903e
. It works with Docker version 25.0.5, build 5dc9bcc
.
The root cause is that the wget (for healthcheck) tries ipv6 to connect.
From within the maildev container:
~ $ wget http://localhost:1080/
Connecting to localhost:1080 ([::1]:1080)
wget: can't connect to remote host: Connection refused
~ $ wget http://127.0.0.1:1080/
Connecting to 127.0.0.1:1080 (127.0.0.1:1080)
saving to 'index.html'
index.html 100% |*************************************************************************************************************************************************************************************************************************************************************| 8390 0:00:00 ETA
'index.html' saved
Once can confirm that using telnet (after installing it):
telnet -6 localhost 1080
Trying ::1...
telnet: Unable to connect to remote host: Connection refused
from maildev.
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 /etc/docker/daemon.json
,
{
"ipv6": true,
"fixed-cidr-v6": "fd00::/64"
}
Maildev currently listens on IPv4 only:
~ $ netstat -lptn
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 0.0.0.0:1025 0.0.0.0:* LISTEN 1/node
tcp 0 0 0.0.0.0:1080 0.0.0.0:* LISTEN 1/node
Maybe it should listen on IPv6 too
from maildev.
For us:
- maildev container works locally in docker compose (both arm64 and amd64 images)
- maildev container does not work in gitlab CI in docker compose (it logs that the UI would have started but its own health check fails)
- maildev container works in gitlab CI when started as a sidecar (without environment variables)
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!
from maildev.
Downgrade docker-ce to older release (25.0.5) fix the issue.
from maildev.
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:
docker compose exec -it maildev wget -q http://127.0.0.1/healthz
wget: can't open 'healthz': File exists
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:
healthcheck:
disable: true
If you use docker compose up -d --wait command, you have to fake a healthy check. This could be performed like this:
healthcheck:
test: ["CMD", "touch", "health"]
interval: 15s
timeout: 5s
retries: 5
from maildev.
Same problem, and also related to localhost being translated as ipv6 instead of ipv4...
from maildev.
@pallost Seems that its docker related, my services are also having weird dns issues, and they cannot resolve any address
from maildev.
Root cause is tracked here: #474
from maildev.
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.
from maildev.
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?
from maildev.
is this fixed on laster image?
from maildev.
Related Issues (20)
- Dockerfile health check is not using correct port and base path HOT 1
- Tarket _blank not always correctly added to head in iframe
- Webhook Communication
- Remember last panelVisibility option selected
- Delete all button not working HOT 5
- the port 1025 doesn't work
- [Vulnerability] Arbitrary File Write leading to Remote Code Execution (RCE) HOT 4
- maildev does not allow STARTTLS advertising
- Health check not working with --wait param of docker compose HOT 1
- ERR_SSL_NO_SUITABLE_SIGNATURE_ALGORITHM without using TLS
- Health check problem with MAILDEV_BASE_PATHNAME, MAILDEV_WEB_USER and MAILDEV_WEB_PASS HOT 1
- Critical Security vulnerabilitie in Docker image
- Config params for testing purposes
- Limiting messages amount HOT 1
- Error on DATA input when sending mail over SMTP
- Cannot connect to the internet from Keycloak docker container HOT 1
- docker: open /var/lib/docker/tmp/GetImageBlob4135723857: no such file or directory.
- Bad sender address syntax for valid addresses
- Perfomance: is it possible to speed up?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from maildev.