Skip to content
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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

馃悰 Bug Report: Health check fails on Docker #108

Open
4WaYDp opened this issue May 20, 2024 · 2 comments
Open

馃悰 Bug Report: Health check fails on Docker #108

4WaYDp opened this issue May 20, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@4WaYDp
Copy link

4WaYDp commented May 20, 2024

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

@4WaYDp 4WaYDp added the bug Something isn't working label May 20, 2024
@4WaYDp 4WaYDp changed the title 馃悰 Bug Report: 馃悰 Bug Report: Health check fails on Docker May 20, 2024
@4WaYDp
Copy link
Author

4WaYDp commented May 20, 2024

Related to #73

@Pix3l01
Copy link
Contributor

Pix3l01 commented Jun 18, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants