Skip to content

The server will not start ​

A server that cannot start says why in one line and exits with status 1. Read the last lines of its log first (docker logs <container>, or docker compose ... logs app), then find the line here.

sh
./joobqui doctor

answers which of the four basics is wrong: database, redis, session (the session secret) or license.

"... failed and did not recover within 60 seconds" ​

What you see. ERROR: applying the database migrations failed and did not recover within 60 seconds: ... Is PostgreSQL (DATABASE_URL) and Redis (REDIS_HOST) reachable?, after a minute of "trying again" lines.

Why. PostgreSQL or Redis did not answer. The text after the colon is the driver's own error: a refused connection, a name that does not resolve, a failed login, a database that does not exist.

What to do.

  1. From the server's host or container, check the address and the port the error names.
  2. Check the database exists: the server creates tables, not the database.
  3. For Redis over TLS, check REDIS_CA_FILE when the certificate is from a CA of your own, and that the host you connect to is a DNS name or IP address the certificate lists.
  4. If the databases are only slow to come up, raise JOOBQUI_BOOT_WAIT_SECONDS (up to 3600).

"the settings saved in the console could not be read from PostgreSQL" ​

PostgreSQL did not answer when the server read its saved settings, before anything else started. Same causes and steps as above.

"SESSION_SECRET is not set", "is ... characters long", "is not random" ​

In production the session secret must be at least 32 characters and not one repeated character. A server set up with the setup page generated one and keeps it in /data: this message then means the volume is not mounted, or a SESSION_SECRET in the environment overrides it with a weak value. Mount the volume, or set a proper value (openssl rand -hex 32).

It serves the setup page instead of the console ​

The server has no licence, or no connections: see Setup and licence. The usual cause after a redeploy is a /data that is not a volume, so it went with the old container.

"cannot be opened with this key" or "its key is missing" ​

The settings file on the data volume cannot be decrypted: see Recovery.

An ERROR: line about a setting ​

A production server checks its settings before it listens and refuses these:

The line namesFix
JOOBQUI_REQUIRE_EMAIL_VERIFICATIONIt is on, but mail is not configured, so nobody could ever confirm an address. Set SMTP_HOST, SMTP_USERNAME and JOOBQUI_PUBLIC_URL, or turn it off.
JOOBQUI_SDK_TOKEN "too weak for production"Use 32 characters or more (openssl rand -hex 32).
JOOBQUI_PAYLOAD_KEYSThe value is malformed. It is a comma-separated list of id:key, each key 32 bytes as 64 hex digits or base64.
JOOBQUI_WORKFLOW_ARCHIVE_DIRThe directory cannot be created or written by the server's user (UID 10001 in the image).
A NAME_FILE variableThe file does not exist or cannot be read by the server's user.

A setting saved in the console never stops a start: the server leaves out as little as it can, says so in the log and shows a red saved but not applied banner on the Settings page.

WARNING: lines at start ​

The server starts, but something is missing:

WarningMeaningFix
JOOBQUI_CLIENT_IP_HEADER is not setBehind a proxy, every visitor counts as one client for the rate limitsTLS and proxies
SMTP_HOST, SMTP_USERNAME or JOOBQUI_PUBLIC_URL is not setPassword-reset mail cannot be sentSettings → Mail
JOOBQUI_SDK_TOKEN is not setThe SDK gateway answers 503Settings → Security
these saved settings cannot be opened with the current JOOBQUI_SECRETS_KEYThe secrets key changed; the named secret settings are ignoredSave them again: see Secrets
the saved licence cannot be usedThe setup page opens to sign in againSetup and licence

The container restarts in a loop, or is unhealthy ​

  • Restarting: it exits at start. The reason is the last ERROR: line of the previous run (docker logs --tail 20 <container>).
  • Unhealthy but running: the image checks GET /healthz on port 4000 (PORT), which only says the process answers. It stays healthy during the setup wizard. GET /readyz is the one that waits for Redis, PostgreSQL and the migrations: it answers 503 with an ok/fail per dependency until they do.
  • Exit status 3 on stop: a shutdown step failed or ran out of time. The log names the step. Give the platform a stop timeout above 20 seconds.