Skip to content

Docker/Unraid: 2026.4.24 and 2026.4.25 gateway never becomes healthy; doctor --fix does not recover, 2026.4.26 doctor still hangs #73846

Closed

Description

@miguelarios

Bug type

Crash / startup failure / doctor repair failure

Summary

On Docker/Unraid, OpenClaw 2026.4.24 and 2026.4.25 never bring the gateway up. Docker reports the container as unhealthy, but this is not just a Docker healthcheck false positive: /healthz never reports healthy and the gateway does not become usable.

I waited a long time for the gateway to finish starting, but it never came up. Running openclaw doctor --fix did not recover the instance.

I also tested openclaw@2026.4.26 directly. doctor --fix improved the bundled dependency install logging and successfully installed missing bundled plugin runtime deps, but after that it stopped producing output and remained stuck as an orphaned openclaw-doctor process. SIGTERM did not stop it; SIGKILL was required.

Environment

  • OpenClaw versions tested:
    • 2026.4.24
    • 2026.4.25
    • 2026.4.26 (be8c246) via npx -y openclaw@2026.4.26
  • Install/deployment method: Docker
  • Host OS: Unraid
  • Runtime inside container:
    • Linux x64
    • Node v24.14.0
  • Gateway command pattern:
    • openclaw gateway --allow-unconfigured --bind lan --port 18789

Steps to reproduce

  1. Run OpenClaw in Docker/Unraid using 2026.4.24 or 2026.4.25.
  2. Start the gateway container.
  3. Wait for the gateway to become healthy.
  4. Check Docker health status.
  5. Check gateway health endpoint inside the container:
    curl -fsS http://127.0.0.1:18789/healthz
  6. Run:
    openclaw doctor --fix
  7. Observe that doctor does not recover the gateway.
  8. Separately test 2026.4.26:
    timeout 240s npx -y openclaw@2026.4.26 --version
    timeout 240s npx -y openclaw@2026.4.26 doctor --fix

Expected behavior

  • Gateway should start successfully in Docker.
  • /healthz should return healthy once startup completes.
  • Docker should report the container as healthy.
  • openclaw doctor --fix should either:
    • repair the instance and exit cleanly, or
    • fail with a clear actionable error.
  • doctor --fix should not hang indefinitely or leave orphaned openclaw-doctor processes.

Actual behavior

For 2026.4.24 and 2026.4.25:

  • Gateway never becomes usable.
  • Docker reports the container as unhealthy.
  • /healthz does not report healthy.
  • Waiting longer does not resolve it.
  • Running openclaw doctor --fix does not recover the gateway.

For 2026.4.26 (be8c246):

  • doctor --fix starts and installs missing bundled plugin runtime deps.
  • Install completes successfully.
  • After the bundled deps install step, doctor stops producing output and does not exit.
  • Process remains alive as openclaw-doctor.
  • SIGTERM does not stop it.
  • SIGKILL is required.

Observed 2026.4.26 output included:

OpenClaw 2026.4.26 (be8c246)

Bundled plugin runtime deps are missing.
...
Installing bundled plugin runtime deps...
Still installing bundled plugin runtime deps after 15s...
Still installing bundled plugin runtime deps after 30s...
Still installing bundled plugin runtime deps after 45s...
Installed bundled plugin runtime deps in 51s
...

After that, no further output was produced and the process remained running.

Process check showed an orphaned doctor process similar to:

openclaw-doctor

Additional context

This looks related to the bundled plugin runtime deps / plugin loader regressions around the 2026.4.24 to 2026.4.26 releases, but the exact Docker/Unraid failure mode does not appear to be fully covered by the existing issues I found.

Possibly related:

Impact

This blocks Docker/Unraid deployments from upgrading past 2026.4.23. The gateway never becomes available on 2026.4.24 and 2026.4.25, and the repair path via doctor --fix does not recover the instance. Testing 2026.4.26 shows doctor still hanging after the bundled deps repair step.

Activity

  1. clawsweeper commented on Apr 28, 2026

    @clawsweeper
    Contributor

    Thanks for the context here. I did a careful shell check against current main, and this is already implemented.

    Current main implements the Docker/runtime-deps recovery path well enough to close this cleanup item: stale legacy runtime-deps locks are expired, doctor repair now anchors and verifies materialization, and Gateway HTTP binding happens before startup plugin runtime loading so /healthz can answer while readiness is still settling. The fix is on main after the latest shipped tag, so this should close as implemented on main rather than as shipped.

    So I’m closing this as already implemented rather than keeping a duplicate issue open.

    Review details

    Best possible solution:

    Keep the current main implementation: stale legacy locks expire, package-manager repair is anchored and verified, and Gateway liveness binds before plugin runtime-deps work. Any remaining steady-state plugin-loader event-loop starvation should stay tracked under the narrower open hot-loop report rather than keeping this Docker/doctor startup report open.

    Do we have a high-confidence way to reproduce the issue?

    Yes for the focused remaining failure path: the current tests model stale legacy PID-alive locks and verify they are removed before repair, while Gateway probe tests verify /healthz remains shallow. The full Docker/Unraid deployment was not live-run in this read-only pass.

    Is this the best way to solve the issue?

    Yes. The current fix is the narrow maintainable direction because it repairs the runtime-deps lock/materialization contract and moves risky plugin runtime work off the pre-bind liveness path without making Docker-specific behavior a core special case.

    Security review:

    Security review: This is a non-PR issue review with no proposed patch to inspect, so no patch security or supply-chain review applies.

    What I checked:

    • Current main SHA inspected: Repository HEAD is 4cbd1b5, matching the review context's current main. (4cbd1b53cf86)
    • Legacy Docker-style locks now expire: shouldRemoveRuntimeDepsLock() now treats PID-alive legacy locks without starttime or createdAtMs as removable once the lock/owner mtimes exceed the stale window, covering the stale Docker PID-reuse lock path that the earlier ClawSweeper comment left open. (src/plugins/bundled-runtime-deps-lock.ts:123, 4cbd1b53cf86)
    • Focused stale-lock regression coverage exists: The runtime-deps tests assert that stale legacy PID-alive locks are removed before repairing dependencies, including a lock owned by the current process PID but without modern owner metadata. (src/plugins/bundled-runtime-deps.test.ts:3836, 4cbd1b53cf86)
    • Doctor repair anchors and verifies installs: Doctor repair flows through repairBundledRuntimeDepsPackagePlanAsync(), which writes an OpenClaw-owned install manifest, runs async package-manager repair, and verifies the requested runtime deps are actually materialized instead of only echoing a requested spec list. (src/plugins/bundled-runtime-deps-install.ts:373, 4cbd1b53cf86)
    • Gateway binds before startup plugin runtime loading: startGatewayServer() now calls prepareGatewayPluginBootstrap(... loadRuntimePlugins: false), starts listening, and only then loads startup plugins in the post-attach runtime path, so bundled runtime-deps stalls no longer prevent the HTTP server from binding /healthz. (src/gateway/server.impl.ts:584, 4cbd1b53cf86)
    • Health probe behavior is documented and tested: Gateway docs define /healthz as shallow liveness that returns once HTTP can answer, and tests assert /healthz returns 200 even when readiness is failing or config loading is blocked. Public docs: docs/cli/gateway.md. (docs/cli/gateway.md:149, 4cbd1b53cf86)

    Likely related people:

    • steipete: Peter Steinberger authored the merged fix: simplify bundled runtime dependency repair #75183 runtime-deps repair commit and the follow-up fix: keep runtime deps repair out of hot paths, both touching the central plugin and Gateway startup paths inspected here. (role: recent maintainer / merger of runtime-deps and Gateway startup fixes; confidence: high; commits: 250376f88577, 29ed5266bf0a; files: src/plugins/bundled-runtime-deps-lock.ts, src/plugins/bundled-runtime-deps.ts, src/plugins/bundled-runtime-deps-install.ts)
    • vincentkoc: Vincent Koc authored the current-main legacy runtime-deps root pruning fix and is credited in the changelog for adjacent runtime-deps and Gateway reliability work around this failure family. (role: recent adjacent runtime-deps maintainer; confidence: medium; commits: 465d1b0d4ba3; files: src/plugins/bundled-runtime-deps-roots.ts, src/plugins/bundled-runtime-deps.ts, src/plugins/bundled-runtime-deps.test.ts)
    • shakkernerd: The merged fix: simplify bundled runtime dependency repair #75183 commit records Shakker as a co-author on the runtime-deps simplification work, and the changelog credits Shakker for adjacent staged package verification and diagnostics work in the same bundled runtime-deps area. (role: runtime-deps repair co-author / adjacent owner; confidence: medium; commits: 250376f88577; files: src/plugins/bundled-runtime-deps-materialization.ts, src/plugins/bundled-runtime-deps-install.ts, src/plugins/bundled-runtime-root.ts)

    Codex review notes: model gpt-5.5, reasoning high; reviewed against 4cbd1b53cf86; fix evidence: commit 250376f88577, main fix timestamp 2026-05-01T07:49:02Z.

  2. locked as resolved and limited conversation to collaborators on May 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    Priority

    None yet

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions