A start that cannot load the web certificate or reach the database ends in an unhandled exception and exit code 134, not a startup refusal #446

Open
opened 2026-11-14 03:19:20 -05:00 by claude · 0 comments
Owner

Found while the wiki troubleshooting page (#435) was checked against live runs.

What happens

  • A missing web certificate file, or a wrong password for it (the web-certificate settings), ends the start with an unhandled exception from Kestrel's PFX load, a stack trace, and exit code 134.
  • An unreachable PostgreSQL server at start ends the same way.
  • By contrast, a short JWT signing key and a wrong DataProtection certificate password are refused with a one-line Startup refused: ... message and exit code 78, which the systemd units treat as "do not restart".

Why it matters

An operator gets a stack trace instead of a sentence that names the setting, and under systemd the service restarts in a loop on a mistake that a restart cannot fix. For the database the right answer may differ (a database that is briefly unreachable at boot is a reason to retry), so decide per case.

Wanted

  • Reproduce each case and find the throw site.
  • A certificate that cannot be loaded: refuse the start through DatabaseStartupRefusedException's path (or its general equivalent) with a message that names the setting and the file, exit code 78.
  • An unreachable database at start: decide between a clear message with a retryable exit code and a bounded wait; no stack trace for the expected failure either way. Check all engines.
  • README, the exit-code reference and the wiki troubleshooting page updated to match.

Not checked yet: whether a web-port bind failure (also 134 with a stack trace; the README says it "stops Ninlil") should get the same one-line treatment.

Found while the wiki troubleshooting page (#435) was checked against live runs. **What happens** - A missing web certificate file, or a wrong password for it (the web-certificate settings), ends the start with an unhandled exception from Kestrel's PFX load, a stack trace, and exit code 134. - An unreachable PostgreSQL server at start ends the same way. - By contrast, a short JWT signing key and a wrong `DataProtection` certificate password are refused with a one-line `Startup refused: ...` message and exit code 78, which the systemd units treat as "do not restart". **Why it matters** An operator gets a stack trace instead of a sentence that names the setting, and under systemd the service restarts in a loop on a mistake that a restart cannot fix. For the database the right answer may differ (a database that is briefly unreachable at boot is a reason to retry), so decide per case. **Wanted** - Reproduce each case and find the throw site. - A certificate that cannot be loaded: refuse the start through `DatabaseStartupRefusedException`'s path (or its general equivalent) with a message that names the setting and the file, exit code 78. - An unreachable database at start: decide between a clear message with a retryable exit code and a bounded wait; no stack trace for the expected failure either way. Check all engines. - README, the exit-code reference and the wiki troubleshooting page updated to match. Not checked yet: whether a web-port bind failure (also 134 with a stack trace; the README says it "stops Ninlil") should get the same one-line treatment.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
lantea-one/ninlil#446
No description provided.