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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unhealthy container status #4

Open
MaelJego opened this issue Jul 16, 2022 · 1 comment
Open

Unhealthy container status #4

MaelJego opened this issue Jul 16, 2022 · 1 comment

Comments

@MaelJego
Copy link

It works as espected thanks, I use it to monitor a raspberry pi, from an Home Assistant install on another raspberry pi on the same network.

But cause i actually learn docker i do a docker ls and find the container in status "unhealthy"

So let's check the issue with:
docker container inspect ha-monitor-api

"Start": "2022-07-16T22:23:47.79945216+01:00",
"End": "2022-07-16T22:23:48.8601395+01:00",
"ExitCode": 1,
"Output": "curl: (7) Failed to connect to 127.0.0.1 port 8123: Connection refused\n"

Ok so in docker-compose.yaml i find:
healthcheck:
test: curl -sS http://127.0.0.1:8123 || exit 1

And in the Dockerfile i find:
HEALTHCHECK --interval=5s --timeout=10s --retries=3 CMD curl -sS 127.0.0.1:9999 || exit 1

8123 is the usual port for Home Assistant. And in my case home assistant is on another system. Maybe i just need to modify the docker-compose.yaml?

@MaelJego
Copy link
Author

Just change the port from 8123 to 9999 in the docker-compose.yaml

It work has espected. The container is now in "Healthy" status.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant