fix(service): diagnose 1053 as a handshake, not a bad config #16
Reference in New Issue
Block a user
No description provided.
Delete Branch "fix/service-start-diagnosis"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
What & why
Every failed
sc.exe startwas reported the same way:For the one error code that actually occurs, that sends the reader to inspect a file that is almost certainly fine.
1053 is not a crash. It is the SCM giving up after 30 seconds waiting for the service process to call
StartServiceCtrlDispatcherand identify itself. The process started, ran, and was very likely serving traffic —sc queryshowsSERVICE_EXIT_CODE : 0, and the same binary with the same config runs perfectly in the foreground. A sidecar older than the one that speaks the SCM protocol produces this every time, on a perfectly good config.See
link#29for the underlying fix.What changed
sc.exe startfailures now go throughwindows_start_failure(), which names the actual cause per code:--config.ERROR_SERVICE_LOGON_FAILED) — the account is the virtual one the SCM creates itself and has no password, so this is a local policy forbidding virtual service accounts rather than a bad credential. Points at INSTALL.md Appendix A4.sc query <name>for the service's own exit code, and the foreground command.The function is pure and tested on both platforms, like
windows_bin_pathabove it, so the text is covered on the Linux CI runner that never sees an SCM.Note on
MIN_SERVICE_SIDECARThe 1053 message names
v1.2.0as the floor. That is the versionlink#29is expected to release as (current is v1.1.1, and afeat:bumps the minor). If that release lands under a different number, this constant and the matching line in INSTALL.md need updating. Nothing enforces the floor — a version gate on an installed binary would refuse deployments that are working, and the Linux side has no such floor at all.How it was tested
cargo test— 140 unit + 9 integration passed, including three new cases:error_1053_is_diagnosed_as_a_handshake_not_a_bad_config— asserts the old sentence is gone, and that the message names both the version check and the foreground command. This is the regression guard.a_logon_failure_points_at_policy_not_a_passwordan_unrecognized_code_still_says_how_to_see_the_real_errorcargo fmt,cargo clippy --all-targetsclean.The message itself was produced by a real failing install on Windows before the fix, and the corrected diagnosis matched what the event log actually said.
Checklist
AI-assisted contributions (required)
Claude Code (Opus 5). I have reviewed and understandevery change, and take responsibility for it. AI-authored commits are
marked with a
Co-Authored-Bytrailer.License
(GNU GPL v3.0 or later), and I have the right to contribute it.