You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
daemon.json missing under a live daemon: rig daemon stop refuses, stale daemon-start.lock left behind #3953
Version: 0.7.19 (found while upgrading to 0.7.21), macOS.
What happened
~/.openrig/daemon.json was missing while the daemon was still running (pid alive, port 7433 answering).
rig daemon stop refused to stop it, because there was no state file to read the pid from.
daemon.log stopped updating on 11-20 at 10:37, so the file most likely vanished then. We do not know why.
A stale daemon-start.lock from the 11-20 start was still present, holding the pid of the live daemon.
Expected
Stop should still work (for example by falling back to the lock file or the port), or the daemon should rewrite its state file when it finds it missing.
Workaround
We recreated daemon.json with the values OpenRig records at start (pid, port, host, db path), archived the stale lock, and then the normal stop and upgrade worked.
Not known: what removed the file. Happy to test a fix or gather more detail if you tell us what to look at.
Thanks, @davey64, for the clear report, the workaround and the offer to test.
We found a possible explanation in the 0.7.19 source: a start that cannot confirm readiness can leave the daemon running, retain the startup lock and return without writing daemon.json. In that situation, the normal stop cannot target it. That fits the missing state file and surviving lock you described, but the lock alone does not prove it; we haven't established whether the file was never written or disappeared later.
0.7.21 includes recovery code for some pending starts, using extra process-identity fields in newer lock files. That code rejects the older lock format written by 0.7.19. We're working on the stop-recovery gaps for older locks and missing state files; we haven't tested your upgrade scenario yet.
If you still have the archived lock or the original startup output, could you share the lock's launcherPid, childPid and startedAt fields, and any startup error message? In particular, did it say "Daemon startup is pending after the readiness deadline" or that listener verification was incomplete? That would help narrow down what happened. No need to recreate the failure on your running daemon.
Thanks again, @davey64, for the report. The stop part is fixed on main as f83b04ef (#3957): when daemon.json is missing, rig daemon stop now identifies the running daemon from its own facts (the listener's /healthz PID, whose output goes to this home's daemon.log) and stops it normally, instead of refusing with "Daemon state is missing". So a stop or an upgrade no longer needs daemon.json recreated by hand. It's on main and not yet in a published release.
We're keeping this issue open because we haven't established why daemon.json went missing in the first place. If it happens again, the startup lock's launcherPid, childPid and startedAt fields and any startup error would still help.
@davey64, an update: #3957 is now released in OpenRig 0.7.25. When daemon.json is missing, rig daemon stop identifies the running daemon from its own facts and stops it normally, instead of refusing. This issue stays open for why daemon.json went missing in the first place; if it happens again, the startup lock's launcherPid, childPid and startedAt fields and any startup error would still help.
Activity
mvschwarz commentedon Nov 25, 2026
Thanks, @davey64, for the clear report, the workaround and the offer to test.
We found a possible explanation in the 0.7.19 source: a start that cannot confirm readiness can leave the daemon running, retain the startup lock and return without writing daemon.json. In that situation, the normal stop cannot target it. That fits the missing state file and surviving lock you described, but the lock alone does not prove it; we haven't established whether the file was never written or disappeared later.
0.7.21 includes recovery code for some pending starts, using extra process-identity fields in newer lock files. That code rejects the older lock format written by 0.7.19. We're working on the stop-recovery gaps for older locks and missing state files; we haven't tested your upgrade scenario yet.
If you still have the archived lock or the original startup output, could you share the lock's launcherPid, childPid and startedAt fields, and any startup error message? In particular, did it say "Daemon startup is pending after the readiness deadline" or that listener verification was incomplete? That would help narrow down what happened. No need to recreate the failure on your running daemon.
fix(cli): health probes never reuse a connection the daemon closed
mvschwarz commentedon Nov 26, 2026
Thanks again, @davey64, for the report. The stop part is fixed on
mainasf83b04ef(#3957): whendaemon.jsonis missing,rig daemon stopnow identifies the running daemon from its own facts (the listener's/healthzPID, whose output goes to this home'sdaemon.log) and stops it normally, instead of refusing with "Daemon state is missing". So a stop or an upgrade no longer needsdaemon.jsonrecreated by hand. It's onmainand not yet in a published release.We're keeping this issue open because we haven't established why
daemon.jsonwent missing in the first place. If it happens again, the startup lock'slauncherPid,childPidandstartedAtfields and any startup error would still help.mvschwarz commentedon Nov 28, 2026
@davey64, an update: #3957 is now released in OpenRig 0.7.25. When
daemon.jsonis missing,rig daemon stopidentifies the running daemon from its own facts and stops it normally, instead of refusing. This issue stays open for whydaemon.jsonwent missing in the first place; if it happens again, the startup lock'slauncherPid,childPidandstartedAtfields and any startup error would still help.docs(release): 0.7.27 notes: rig daemon stop can still stop an identi…