A refused start under the Windows service leaves an error entry in the Application event log #338
No reviewers
Labels
No labels
agent
api-regen
agent
architect
agent
coder
agent
console-coder
agent
docs-writer
agent
mechanic
agent
protocol-coder
agent
storage-coder
area/api
area/ci
area/console
area/dhcp
area/dns
area/docs
area/packaging
area/process
area/storage
area/windows
kind
bug
kind
chore
kind
docs
kind
epic
kind
feature
kind
performance
kind
security
kind
test
priority
high
priority
low
priority
medium
resolution
duplicate
resolution
not-a-bug
resolution
wontfix
status
blocked
status
in-progress
status
needs-decision
status
needs-design
status
ready
theme
ad-samba-dns
theme
alternatives-benchmark
theme
console-toolchain
theme
later
theme
parity-devices
theme
parity-query
theme
post-release-fixes
theme
tracker-setup
theme
valkey
theme
windows-installer
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
lantea-one/ninlil!338
Loading…
Reference in a new issue
No description provided.
Delete branch "feature/336-windows-refusal-visibility"
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?
Under the Windows service, a deliberate startup refusal (exit 78: the key-ring certificate, the JWT key, the storage registration, the relational migrator, the MongoDB guard, the pending storage switch) left no trace before this change: no console, nothing in the event log, and the service simply stopped.
StartupRefusalReporteris used by all six refusal handlers inProgram.cs. It logs the critical line as before. When Ninlil runs as a Windows service and no host logger exists yet (the key-ring, JWT and storage-registration sites), it also writes one Error entry to the Application log underNinlil.Web. The later sites pass the host logger, whose own EventLog provider records the line, so there is never a second entry. An event-log failure is logged and never throws.Get-WinEvent).sc.exe queryshows exit code 0 because the refusal happens before the service connects to the Service Control Manager; exit 78 appears in a console run.Verified on Lofnheim (Windows 10.0.26200,
NT SERVICE\Ninlil), with exe builds of0f3e2dc5and11a18414:Start-Servicefails with "Cannot start service".Start-Servicefails.On Linux: build has 0 warnings, csharpier is clean, Web.Tests passes 2352 (without the Docker-only tests), and
StartupRefusalProcessTestsstill shows exit 78.Closes #336
🤖 Generated with Claude Code
https://claude.ai/code/session_01T33E3pmQvqkTriyQUMNUTK
Ghost referenced this pull request2026-11-06 12:18:13 -05:00