Ir al contenido
Menú
Se marcó esta pregunta
1 Responder
664 Vistas

Hi Community,

I’m setting up Odoo 18 in Docker with HashiCorp Vault for secrets management, but the container fails health checks. Here’s my setup:

Error:

ERROR: for odoo Container "8659c****02" is unhealthy. ERROR: Encountered errors while bringing up the project.

Configuration:dp

  1. Docker Compose:
    services:
      vault:
        image: hashicorp/vault
        # ... (dev mode setup)
      odoo:
        depends_on:
          vault:
            condition: service_healthy
        healthcheck:
          test: ["CMD", "curl", "-f", "http://localhost:8069/web/health"]
  2. Symptoms:
    • Odoo container starts but exits as "unhealthy"
    • Vault logs show successful secret storage
    • Manual curl to http://localhost:8069 works

What I’ve Tried:

✅ Verified Vault secrets are injected (docker exec odoo cat /etc/odoo/odoo.conf)

✅ Increased start_period to 120s

✅ Added workers = 0 to odoo.conf for debugging

Need Help With:

  1. Why does the health check fail despite Odoo responding?
  2. Are there better health check parameters for Odoo?
  3. How to debug Vault-Odoo connection issues?
Avatar
Descartar
Mejor respuesta

The thing is that curl may not installed inside your container.

I don't know Odoo, but I've just solved the same problem with Vault. 

I tried 

test: ["CMD", "curl", "-f", "http://localhost:8200/v1/sys/health"]

got the same error, made "docker inspect my-app-vault-1" command to get a log and here's what I found out: 

"Output": "OCI runtime exec failed: exec failed: unable to start container process: exec: \"curl\": executable file not found in $PATH: unknown"

So I replaced test field with:

test: ["CMD", "vault", "status", "-address=http://127.0.0.1:8200"]

where "vault" is a CLI command and now everything's ok. 

Maybe this will help you or someone else.

Avatar
Descartar
Publicaciones relacionadas Respuestas Vistas Actividad
1
jun 25
11038
1
nov 22
4161
1
nov 20
6218
6
jun 20
22789
1
ago 25
2288