Closed hot22shot closed 2 weeks ago
hmmm, that's interesting. Are you running the container in any special setup? Kubernetes, for example?
My host is an unraid server with docker and I used portainer to deploy it with a stack.
Are you using "network=host" by any chance?
no, I have a dedicated network for the stack :
networks:
info-network:
name: info-network
driver: bridge
hmmm, interesting. Does using localhost work by any chance?
localhost is also failing :
/app # wget --spider http://localhost:3000/api/health
Connecting to localhost:3000 ([::1]:3000)
wget: can't connect to remote host: Connection refused
Ok this will need some googling I guess. Can you share your compose file for reference?
I solved it, I had a HOSTNAME env variable set to "hoarder-app" in my docker-compose file, that conflicted with :
const hostname = process.env.HOSTNAME || '0.0.0.0'
in the server.js file.
It prevented hoarder from biding 0.0.0.0 and instead only binded the local address of the container. Once I commented my variable in the docker compose script the container is now healthy !
ah that makes sense 👍
Describe the Bug
Hi,
The health status is always unhealthy for the docker container of the hoarder-app. But the application is working correctly.
I checked the healthcheck and found that the test fails :
/app # wget --spider http://127.0.0.1:3000/api/health
Connecting to 127.0.0.1:3000 (127.0.0.1:3000)
wget: can't connect to remote host (127.0.0.1): Connection refused
But if I use the actual @ip of the container it works :
/app # wget --spider http://172.24.0.5:3000/api/health
Connecting to 172.24.0.5:3000 (172.24.0.5:3000)
remote file exists
Steps to Reproduce
Check the status of the hoarder-app container.
Expected Behaviour
healthcheck is OK
Screenshots or Additional Context
No response
Device Details
No response
Exact Hoarder Version
0.18.0