Skip to content

Windows gateway probe still reports unreachable while gateway health is OK on 2026.5.6 #79099

Closed

Description

@try-imladri

Summary

On OpenClaw 2026.5.6 / Windows, the gateway can be listening and pass gateway health, while gateway probe and doctor still report it as unreachable/not running.

This looks related to earlier reports such as #74279 and #48360, but those conversations are locked, so I am filing a current-stable repro instead of adding there.

Environment

  • OpenClaw: 2026.5.6 (c97b9f7)
  • Node: v24.15.0
  • OS: Windows
  • Install: isolated npm install of openclaw@latest
  • Profile: imladri-sidequest
  • Gateway: loopback 127.0.0.1:18789

Reproduction

openclaw --profile imladri-sidequest gateway run --dev --port 18789 --auth none --bind loopback --force --allow-unconfigured --verbose
openclaw --profile imladri-sidequest gateway health
openclaw --profile imladri-sidequest gateway probe
openclaw --profile imladri-sidequest doctor --non-interactive

Observed

gateway health succeeds:

Gateway Health OK (1327ms)

gateway probe reports unreachable:

Reachable: no
Connect: failed - timeout
Found 0 gateways via Bonjour

doctor --non-interactive reports a contradiction:

  • Gateway not running
  • but also detects port 18789 in use by the gateway PID and recommends stopping/changing the port

A direct TCP check confirms 127.0.0.1:18789 is listening.

Expected

If the gateway listener is alive and gateway health succeeds, then gateway probe / doctor should either report the gateway as reachable or clearly explain the specific auth/probe-path failure instead of reporting it as not running.

Notes

This run also reproduced the --auth none / device identity required issue tracked in #75780. That may be part of why the probe path fails, but the resulting CLI diagnostics are still misleading for a local user: one built-in command says healthy while another says unreachable/not running.

Activity

  1. clawsweeper commented on May 7, 2026

    @clawsweeper
    Contributor

    Codex review: keeping this open for maintainer follow-up; there is still a little grit to resolve. Reviewed June 18, 2026, 3:27 PM ET / 19:27 UTC.

    Summary
    Keep open. Current main still has the source-level probe and doctor misclassification, but #93948 is an open, clean fixing PR with closing syntax, so this issue should stay open until that PR merges or is rejected.

    Reproducibility: yes. at source level: simulate a gateway client that accepts a WebSocket and closes before hello-ok, and current main settles with null connectLatencyMs so probe/status treat it as unreachable. I did not rerun the exact Windows install environment.

    Root-cause cluster
    Relationship: canonical
    Canonical: #79099
    Summary: This issue is the current canonical report for the gateway probe/doctor reachable-but-errored misclassification; the open PR is the active fix candidate.

    Members:

    Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything.

    Next step
    Do not queue a new repair job because #93948 is already the open fix candidate for this issue.

    Review details

    Best possible solution:

    Review and land or close #93948; once the fix merges, close this issue as implemented by that PR.

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

    Yes, at source level: simulate a gateway client that accepts a WebSocket and closes before hello-ok, and current main settles with null connectLatencyMs so probe/status treat it as unreachable. I did not rerun the exact Windows install environment.

    Is this the best way to solve the issue?

    Yes, the best fix is to carry accepted-but-errored gateway state through probe and doctor diagnostics, as the linked open PR attempts. A Windows-only timeout bump would be narrower than the observed auth and protocol-mismatch failures.

    AGENTS.md: found and applied where relevant.

    Remaining risk / open question:

    • The exact Windows 2026.5.6/2026.5.27 repro commands were not rerun in this read-only review.
    • The open fixing PR's real behavior proof covers Linux token/auth rejection and tests, but not the original Windows timeout or older-binary protocol-mismatch smoke.

    Codex review notes: model internal, reasoning high; reviewed against 4c9b4c32ef41.

    Label changes

    Label justifications:

    • P2: This is a real gateway diagnostic bug with multiple reports, but the gateway can still be healthy and usable in the main repro.
    • impact:other: The issue affects setup and diagnostic reliability, which is maintainer-visible but outside the specific owned impact labels.
    Evidence reviewed

    What I checked:

    • Root policy read: Read the full root AGENTS.md and applied the review rules requiring current source, related item, scoped guidance, and owner-history checks. (AGENTS.md:1, 4c9b4c32ef41)
    • Scoped gateway policy read: Gateway scoped guidance applies because the item touches gateway probe and health paths. (src/gateway/AGENTS.md:1, 4c9b4c32ef41)
    • Current probe still loses accepted-before-hello reachability: Current main records connect latency only in onHelloOk; onClose before hello settles the failed probe while connectLatencyMs is still null, so accepted-then-closed handshakes remain indistinguishable from never-connected probes. (src/gateway/probe.ts:380, 4c9b4c32ef41)
    • Current status classification depends on connectLatencyMs: isProbeReachable returns true only when probe.ok is true or connectLatencyMs is non-null, so the null latency from pre-hello close is classified as unreachable. (src/commands/gateway-status/helpers.ts:296, 4c9b4c32ef41)
    • Current doctor health path still says not running for gateway closed: checkGatewayHealth maps any error string containing gateway closed to the Gateway not running note, even when the close came from an accepted WebSocket handshake. (src/commands/doctor-gateway-health.ts:130, 4c9b4c32ef41)
    • Current daemon repair flow repeats the same classification: maybeRepairGatewayDaemon repeats the gateway closed substring check and Gateway not running rendering after healthCommand fails. (src/commands/doctor-gateway-daemon-flow.ts:486, 4c9b4c32ef41)

    Likely related people:

    • steipete: Recent path history includes probe auth reuse, event-loop-aware gateway client start, lightweight doctor liveness, and gateway documentation work around the same diagnostic surface. (role: recent gateway probe and doctor contributor; confidence: high; commits: 193c7432e33f, 6bbacd14a366, 99950c7f1272; files: src/gateway/probe.ts, src/commands/doctor-gateway-health.ts, docs/gateway/index.md)
    • obviyus: Authored the probe capability/reachability split and pending-pairing detail work that define how connect latency and reachability are interpreted. (role: probe reachability behavior contributor; confidence: high; commits: 485c258aaf96, 2c5335490121, f070a92e19fb; files: src/gateway/probe.ts, src/commands/gateway-status/helpers.ts, src/commands/doctor-gateway-daemon-flow.ts)
    • vincentkoc: Recent history touches doctor utility structure, responsive reset/refresh paths, memory probe timeout handling, and local shallow blame currently points the checked-out files at a boundary commit by this author. (role: recent doctor and gateway maintainer-area contributor; confidence: medium; commits: 9b8102d7745b, 5a0d6c7ad86b, 6bbb1b79e11a; files: src/commands/doctor-gateway-health.ts, src/commands/doctor-gateway-daemon-flow.ts, src/gateway/probe.ts)
    • sallyom: Recent commits added and clarified gateway version-skew diagnostics, which match the protocol-mismatch reproduction added in the issue comments. (role: adjacent gateway version-skew diagnostics contributor; confidence: medium; commits: cbc69d9a96d7, 397cf2b9ff47; files: src/commands/doctor-gateway-health.ts, src/gateway/server/ws-connection/message-handler.ts)
    • xialonglee: Opened the current clean fixing PR that references this issue and changes the exact probe and doctor files implicated by the source review. (role: open candidate-fix author; confidence: high; commits: d553f0427946; files: src/gateway/probe.ts, src/commands/doctor-gateway-health.ts, src/commands/doctor-gateway-daemon-flow.ts)
    How this review workflow works
    • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
    • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
    • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
    • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
    • Maintainers can also comment @clawsweeper review to request a fresh review only.
    • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
    • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
    • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.
  2. YB0y commented on May 10, 2026

    @YB0y
    Contributor

    Adding a Linux + protocol-mismatch case to broaden the scope of this issue beyond the Windows / connect-timeout repro.

    Environment

    • OS: Ubuntu 24.04 / Linux 6.8.0-110-generic
    • OpenClaw: CLI from a worktree whose package.json says "version": "2026.5.10-beta.1", gateway running with v2026.5.7's dist/ (host Node v22.22.2)
    • Cause: CLI/gateway version skew, so the gateway closes the WebSocket handshake with 1002 "protocol mismatch" (src/gateway/server/ws-connection/message-handler.ts:488).

    Reproduction

    # Gateway already running on :18789 from one worktree's dist (e.g. v2026.5.7).
    # Run doctor from a different worktree whose package.json is a newer version (e.g. 2026.5.10-beta.1):
    pnpm openclaw doctor

    Observed (verbatim)

    gateway connect failed: GatewayClientRequestError: protocol mismatch
    ◇  Gateway ──────────────╮
    │  Gateway not running.  │
    ├────────────────────────╯
    …
    ◇  Gateway port ──────────────────────────────────────────────────────╮
    │  Port 18789 is already in use.                                      │
    │  - pid 12102 orin: …/node dist/index.js gateway --port 18789        │
    │  - Another process is listening on this port.                       │
    ├─────────────────────────────────────────────────────────────────────╯
    

    Same user-visible contradiction as the Windows / timeout case in the original report: one panel asserts the gateway is not running while the very next panel correctly identifies the gateway PID listening on the same port.

    Source pointers (current origin/main)

    The two note("Gateway not running.", "Gateway") emit sites live in src/commands/doctor-gateway-health.ts:49 and src/commands/doctor-gateway-daemon-flow.ts:344. Both gate the rendering on a String(err).includes("gateway closed") substring check on the connect error. Anything that the heuristic doesn't recognize falls through to formatHealthCheckFailure(err) and only leaks a single non-paneled gateway connect failed: … line — but the "Gateway not running" panel header still ends up rendered for any reachable-but-errored state alongside the port-scan panel that proves the gateway is up.

    Suggested direction (mirrors what's already implied by this issue)

    The connectivity probe should distinguish three states and only render "Gateway not running" for the first one:

    1. Unreachable — TCP/WebSocket connect itself failed (ECONNREFUSED, no route, port truly free).
    2. Reachable-but-errored — connection accepted then closed/errored at handshake (protocol mismatch, auth failure, gateway-starting, server timeout).
    3. Running and reachable.

    The third state is what the port-scan panel already correctly detects. Folding the port-scan signal back into the gateway-status panel — or at least surfacing the underlying close reason (e.g. protocol mismatch here, connect failed: timeout in the original Windows repro) — would resolve the contradiction in both reproductions.

    This case (Linux + protocol mismatch) is common during dev / upgrade flows where the global openclaw CLI on PATH and the running gateway daemon are last built from different versions.

  3. JIRBOY commented on May 24, 2026

    @JIRBOY
    Contributor

    Repro confirmed on OpenClaw 2026.5.22 (a374c3a) / Windows 10 19045 / Node 24.14.1.

    Additional reproducer:

    Gateway is confirmed running (port 18789 listening, ESTABLISHED connections):

    But multiple diagnostic commands report it as unreachable:

    Note: The gateway health endpoint responds in ~639ms, which may be close to the probe timeout threshold. If the probe has a hard timeout < 1000ms, this could explain the false-negative on Windows where event loop / network latency is slightly higher.

  4. h-mascot commented on May 30, 2026

    @h-mascot
    Contributor

    Additional HeraldLabs Windows beta repro from Miriam Peter's install-smoke report.

    Environment:

    • OS: Windows 11 Version 25H2
    • OpenClaw: 2026.5.27 (27ae826)
    • Node: v24.16.0
    • Install method: PowerShell install script / QuickStart
    • Terminal: Windows PowerShell

    Observed during install:

    • Installer completed gateway daemon setup.
    • PowerShell output reported Health check failed: timeout.
    • Gateway was subsequently reachable at http://127.0.0.1:18789/.

    Impact:

    • Low severity in this report because the gateway recovered, but the install output makes a beginner think the install failed and can trigger unnecessary reinstall/debug loops.

    Source: HeraldLabs beta QA report, 2026-05-30.

  5. added
    P2Normal backlog priority with limited blast radius.
    impact:otherThis issue has meaningful maintainer-visible impact outside the owned taxonomy.
    no-staleExclude from stale automation
    issue-rating: 🦞 diamond lobsterVery strong issue quality with high-confidence source-level or clear reproduction.
    clawsweeper:source-reproClawSweeper found a high-confidence source-level issue reproduction.
    clawsweeper:queueable-fixClawSweeper marked this issue as an existing queue_fix_pr work candidate.
    clawsweeper:fix-shape-clearClawSweeper found a clear likely implementation shape for this issue.
    clawsweeper:linked-pr-openClawSweeper 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.
    and removed
    no-staleExclude from stale automation
    clawsweeper:fix-shape-clearClawSweeper found a clear likely implementation shape for this issue.
    clawsweeper:queueable-fixClawSweeper marked this issue as an existing queue_fix_pr work candidate.
    on Jun 14, 2026
  6. added a commit that references this issue on Jun 19, 2026
    9e4adc6
  7. added a commit that references this issue on Jun 19, 2026
    6256ad8
  8. steipete commented on Jun 19, 2026

    @steipete
    Contributor

    Landed in #93948 as 6256ad8. Gateway probe diagnostics now classify reachability only after transport validation and sanitize close diagnostics; focused gateway/doctor tests passed (307 tests).

    6256ad8

  9. added a commit that references this issue on Jun 20, 2026
    765b074
  10. locked as resolved and limited conversation to collaborators on Jun 25, 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

    P2Normal backlog priority with limited blast radius.clawsweeper:linked-pr-openClawSweeper 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:source-reproClawSweeper found a high-confidence source-level issue reproduction.impact:otherThis issue has meaningful maintainer-visible impact outside the owned taxonomy.issue-rating: 🦞 diamond lobsterVery strong issue quality with high-confidence source-level or clear reproduction.

    Type

    No type

    Fields

    Priority

    None yet

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions