-
-
Notifications
You must be signed in to change notification settings - Fork 80.7k
doctor --fix self-terminates with SIGTERM when gateway is running #78217
Copy link
Copy link
Closed
Labels
P2Normal backlog priority with limited blast radius.Normal backlog priority with limited blast radius.clawsweeper:linked-pr-openClawSweeper found an open linked pull request for this issue.ClawSweeper found an open linked pull request for this issue.clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.ClawSweeper does not recommend queueing a new automated fix PR for this issue.clawsweeper:source-reproClawSweeper found a high-confidence source-level issue reproduction.ClawSweeper found a high-confidence source-level issue reproduction.impact:crash-loopCrash, hang, restart loop, or process-level availability failure.Crash, hang, restart loop, or process-level availability failure.issue-rating: 🦞 diamond lobsterVery strong issue quality with high-confidence source-level or clear reproduction.Very strong issue quality with high-confidence source-level or clear reproduction.
Description
Metadata
Metadata
Assignees
Labels
P2Normal backlog priority with limited blast radius.Normal backlog priority with limited blast radius.clawsweeper:linked-pr-openClawSweeper found an open linked pull request for this issue.ClawSweeper found an open linked pull request for this issue.clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.ClawSweeper does not recommend queueing a new automated fix PR for this issue.clawsweeper:source-reproClawSweeper found a high-confidence source-level issue reproduction.ClawSweeper found a high-confidence source-level issue reproduction.impact:crash-loopCrash, hang, restart loop, or process-level availability failure.Crash, hang, restart loop, or process-level availability failure.issue-rating: 🦞 diamond lobsterVery strong issue quality with high-confidence source-level or clear reproduction.Very strong issue quality with high-confidence source-level or clear reproduction.
Type
Fields
Priority
None yet
Summary
openclaw doctor --fixaborts with SIGTERM when the gateway service is running, instead of either completing safe-live fixes or cleanly skipping them.Observed multiple times in the same session:
systemctl --user status openclaw-gateway.service)/healthzreturning{"ok":true,"status":"live"}openclaw doctor --fix --non-interactiveemits some output, then exits via SIGTERM before completing all fix actionsThe doctor self-confuses: it can't talk to the gateway over WS (3-second timeout), then concludes the port is "already in use" (by the same gateway that just answered
/healthz), then SIGTERMs itself.Environment
systemctl --useruser supervisionReproduction
curl http://127.0.0.1:18789/healthz→{"ok":true,"status":"live"}openclaw doctor --fix --non-interactiveExpected behavior
doctor --fixshould either:--fixagainst a live gateway and tell the user to stop it firstWhat it should NOT do is partially run, then SIGTERM itself mid-stream, leaving the user uncertain about what got applied.
Impact
--fixfor routine maintenance against a running gatewayWorkarounds
mv *.jsonl *.deleted.<ts>, move stale agent dirs to a.archived/sibling, etc.openclaw doctor --non-interactive(no--fix) to validate state — that one runs cleanly against a live gatewaySuggested fix
Port already in usewarning when the gateway PID match equals the running gateway service PID (it's the same process answering/healthzand listening on 18789 — there's no conflict).--fixshould ever be allowed against a running gateway — if not, exit cleanly with code 78 ("config valid, but live gateway detected; stop it first") rather than SIGTERM.