-
-
Notifications
You must be signed in to change notification settings - Fork 80.7k
openclaw gateway restart can return false failure after healthy systemd restart #66675
Copy link
Copy link
Closed as not planned
BingqingLyu/openclaw
#2508Closed as not planned
Copy link
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:needs-live-reproClawSweeper needs live local, crabbox, or manual validation to confirm this issue.ClawSweeper needs live local, crabbox, or manual validation to confirm 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.impact:crash-loopCrash, hang, restart loop, or process-level availability failure.Crash, hang, restart loop, or process-level availability failure.issue-rating: 🐚 platinum hermitGood issue quality with a plausible reproduction path needing some confirmation.Good issue quality with a plausible reproduction path needing some confirmation.staleMarked as stale due to inactivityMarked as stale due to inactivity
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:needs-live-reproClawSweeper needs live local, crabbox, or manual validation to confirm this issue.ClawSweeper needs live local, crabbox, or manual validation to confirm 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.impact:crash-loopCrash, hang, restart loop, or process-level availability failure.Crash, hang, restart loop, or process-level availability failure.issue-rating: 🐚 platinum hermitGood issue quality with a plausible reproduction path needing some confirmation.Good issue quality with a plausible reproduction path needing some confirmation.staleMarked as stale due to inactivityMarked as stale due to inactivity
Type
Fields
Priority
None yet
Summary
openclaw gateway restartcan return a false failure on Linux/systemd even when the gateway restarts successfully and is immediately healthy afterward.Environment
2026.4.12and still reproducible after updating to2026.4.14127.0.0.1:18789/usr/bin/node /usr/lib/node_modules/openclaw/dist/index.js gateway --port 18789Observed behavior
After running:
I can hit this pattern:
openclaw gateway statusreports runtimerunningandRPC probe: okopenclaw gateway probereports connect ok / RPC okObserved error noise around the failures included:
exec approval followup dispatch failedunknown or expired approval idSession followup failed: gateway timeout after 60000msWhy this looks like a false negative
After the reported restart failure, the gateway is healthy:
openclaw gateway status-> running, RPC okopenclaw gateway probe-> reachable yes, connect ok, RPC okI also rebooted the host during investigation, upgraded the kernel, and re-verified the same general pattern on the healthy post-reboot install.
Narrowed code regions
I narrowed the likely reporting path to these areas in the current npm build:
dist/daemon-cli-87pputG1.jsrunDaemonRestart(...)dist/lifecycle-core-BZacBWkW.jsrunServiceRestart(...)dist/restart-health-CGx4SqG5.jswaitForGatewayHealthyRestart(...)inspectGatewayRestart(...)dist/bash-tools-CEAaYnEc.jssendExecApprovalFollowupResult(...)dist/server.impl-BbJvXoPb.jsunknown or expired approval idSpecific suspicion
There seem to be two overlapping signals:
exec approval followup dispatch failedunknown or expired approval idMy working theory is that a successful restart is getting contaminated by a stale/expired exec approval followup path or adjacent post-restart reporting path, which causes the command to surface failure even though the service is healthy.
Workaround
For now, the reliable operator workaround is:
and treat
status/probeas authoritative if they are healthy, instead of trusting the restart exit code alone.Additional note
I also confirmed that the systemd restart helper itself looks straightforward (
systemctl --user restart ...) and the gateway comes back with a healthy runtime + probe, so this does not look like a real service restart failure.If useful, I can help test a candidate patch or provide a more surgical repro if you want a build to try.