You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The hosts file is correct. The problem is caused by the server only listening on IPv4 by default. Since Docker now supports IPv6, IPv6 has precedence over v4 so localhost resolves to [::1] before resolving to 127.0.0.1 causing wget to error out.
In my opinion, the best way to fix this would be to start the server on both IPv4 and IPv6 by default, unless there are some problems (but there shouldn't be any).
As a quick fix, depending on your setup, you can either:
run the container with the flag --sysctl=net.ipv6.conf.all.disable_ipv6=1 in your docker run command to disable IPv6 in the container complitely
modify the healthcheck in the docker-compose.yaml file by replacing localhost with 127.0.0.1
Describe the bug
Health check fails on Docker
Steps to reproduce the bug
{
"Status": "starting",
"FailingStreak": 1,
"Log": [
{
"Start": "2024-05-20T14:01:44.00930286+02:00",
"End": "2024-05-20T14:01:44.063915771+02:00",
"ExitCode": 1,
"Output": "wget: can't connect to remote host: Connection refused\n"
}, [...]
Solution
The health check in the Dockerfile points wget to localhost which can not be resolved. Please add a /etc/hosts file (127.0.0.1 localhost).
Context
The image used was from quay.io
The text was updated successfully, but these errors were encountered: