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
healthcheck.sh ignores ROCKET_HOST value (if different from "localhost") and erroneously reports container as Unhealthy
Deployment environment
Docker installation of vaultwarden with a little customization (set ROCKET_HOST and ROCKET_PORT in the environment section of docker-compose).
vaultwarden version:
vaultwarden:latest
Install method:
docker / docker-compose
Steps to reproduce
Set ROCKET_HOST in docker-compose environment section for the container to a real local IP address (e.g. 192.168.1.1).
Set "network_mode: host" in docker-compose.
Start up the container.
After a few minutes, check container status with "docker ps".
Expected behaviour
"docker ps" reports container as "Healthy" if healthy, regardless of whether ROCKET_HOST is "localhost" or a different value.
Actual behaviour
"docker ps" reports container as "Unhealthy" if ROCKET_HOST value is different from "localhost".
Troubleshooting data
Issue stems from the very last line of /healthcheck.sh, which hardcodes "localhost" as the destination host for the curl call.
Consequently, if Rocket doesn't listen on localhost:$ROCKET_PORT, but on (e.g.) 192.168.1.1:$ROCKET_PORT, the healthcheck will fail and the container will be reported as Unhealthy.
The text was updated successfully, but these errors were encountered:
I assume you meant ROCKET_ADDRESS, not ROCKET_HOST? The latter isn't a thing, AFAIK. Anyway, #2844 should fix this.
BlackDex
changed the title
Using a custom ROCKET_HOST value results in erroneously reporting container as "Unhealthy" (healthcheck.sh)
Using a custom ROCKET_ADDRESS value results in erroneously reporting container as "Unhealthy" (healthcheck.sh)
Oct 20, 2022
Subject of the issue
healthcheck.sh ignores ROCKET_HOST value (if different from "localhost") and erroneously reports container as Unhealthy
Deployment environment
Docker installation of vaultwarden with a little customization (set ROCKET_HOST and ROCKET_PORT in the environment section of docker-compose).
vaultwarden version:
vaultwarden:latest
Install method:
docker / docker-compose
Steps to reproduce
Set ROCKET_HOST in docker-compose environment section for the container to a real local IP address (e.g. 192.168.1.1).
Set "network_mode: host" in docker-compose.
Start up the container.
After a few minutes, check container status with "docker ps".
Expected behaviour
"docker ps" reports container as "Healthy" if healthy, regardless of whether ROCKET_HOST is "localhost" or a different value.
Actual behaviour
"docker ps" reports container as "Unhealthy" if ROCKET_HOST value is different from "localhost".
Troubleshooting data
Issue stems from the very last line of /healthcheck.sh, which hardcodes "localhost" as the destination host for the curl call.
Is:
Should be (with the proper initialization of ROCKET_HOST earlier, of course):
Consequently, if Rocket doesn't listen on localhost:$ROCKET_PORT, but on (e.g.) 192.168.1.1:$ROCKET_PORT, the healthcheck will fail and the container will be reported as Unhealthy.
The text was updated successfully, but these errors were encountered: