Symptom

Kraken nightly architectural scan flagged asymmetric startup error semantics: the server could start with hostname 'unknown' silently (no log warning), while a missing TLS password file crashed the process with misleading messages saying “using legacy password” in all three error paths even though no legacy fallback exists. The readPfxPassword() catch block also re-wrapped an IllegalArgumentException in another IllegalArgumentException with a less specific message, making it impossible to distinguish “file missing” from “file empty” in logs.

Root cause

ServerIdentity.resolveHostName() exhausts five resolution strategies and silently returns "unknown" when all fail — no warning log, so operators have no signal that hostname resolution failed. KtorConfig.readPfxPassword() was written with placeholder log messages that referred to a legacy password fallback that was removed during a refactor, and its catch block swallowed the specific IllegalArgumentException thrown for the empty-file case and replaced it with a generic one, collapsing two distinct failure modes into one indistinguishable message.

Fix

Prevention