openclaw - ✅(Solved) Fix [Bug]: Gateway HTTP server hangs indefinitely on Windows (no response to any request, health check timeout) [1 pull requests, 1 comments, 2 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
openclaw/openclaw#69674Fetched 2026-04-22 07:49:26
View on GitHub
Comments
1
Participants
2
Timeline
4
Reactions
0
Timeline (top)
labeled ×2commented ×1cross-referenced ×1

Gateway starts and binds to port 18789, but HTTP requests hang indefinitely after Request completely sent off. openclaw doctor health check times out after 10 seconds. TCP connection is established but no data is transmitted.

Error Message

Gateway logs show readiness, but no HTTP response is ever sent. netstat confirms LISTENING and ESTABLISHED connections. No error logs appear in console or log file. openclaw doctor reports WebSocket timeout.

Root Cause

Gateway starts and binds to port 18789, but HTTP requests hang indefinitely after Request completely sent off. openclaw doctor health check times out after 10 seconds. TCP connection is established but no data is transmitted.

Fix Action

Fix / Workaround

Disabling all plugins except talk-voice does not resolve the issue. Resetting openclaw.json to defaults does not help. Node.js version used: v24.12.0 (possible compatibility factor, not yet tested with v20 LTS). Workaround: CLI commands (openclaw chat, openclaw repl) still work.

PR fix notes

PR #69701: fix(gateway): skip IPv6 ::1 loopback binding on Windows to prevent HTTP hang

Description (problem / solution / changelog)

Summary

  • Problem: Gateway HTTP server hangs on Windows — all HTTP requests (including health checks) time out and never receive a response.
  • Why it matters: Windows users cannot run the gateway at all; any request hits ESTABLISHED TCP state but the Node.js request event never fires.
  • What changed: resolveGatewayListenHosts now returns only ["127.0.0.1"] on Windows (skips ::1). Two unit tests added to lock in this behaviour.
  • What did NOT change: Non-Windows platforms retain existing dual-binding logic unchanged.

Change Type (select all)

  • Bug fix
  • Feature
  • Refactor required for the fix
  • Docs
  • Security hardening
  • Chore/infra

Scope (select all touched areas)

  • Gateway / orchestration
  • Skills / tool execution
  • Auth / tokens
  • Memory / storage
  • Integrations
  • API / contracts
  • UI / DX
  • CI/CD / infra

Linked Issue/PR

  • Closes #69674
  • Related #
  • This PR fixes a bug or regression

Root Cause (if applicable)

  • Root cause: resolveGatewayListenHosts returns ["127.0.0.1", "::1"] when IPv6 is bindable. On Windows, Node.js (via libuv uv_tcp_bind6) binds ::1 without UV_TCP_IPV6ONLY, creating a dual-stack socket that also accepts IPv4-mapped ::ffff:127.0.0.1. Simultaneously binding 127.0.0.1 on the same port causes Windows TCP routing to become non-deterministic: connections reach ESTABLISHED state at the TCP layer but the Node.js request event never fires.
  • Missing detection / guardrail: No platform guard existed in resolveGatewayListenHosts; IPv6 bindability was checked without accounting for Windows dual-stack socket semantics.
  • Contributing context (if known): This is a libuv/Windows behaviour difference — Linux handles the same dual-bind cleanly; Windows does not.

Regression Test Plan (if applicable)

  • Coverage level that should have caught this:
    • Unit test
    • Seam / integration test
    • End-to-end test
    • Existing coverage already sufficient
  • Target test or file: src/gateway/net.test.ts
  • Scenario the test should lock in: On process.platform === "win32", resolveGatewayListenHosts must return only ["127.0.0.1"] and must never call canBindToHost with ::1.
  • Why this is the smallest reliable guardrail: The hang is deterministic given the dual-bind; a unit test on the host-resolution function catches any regression without needing a live server.
  • Existing test that already covers this (if any): None — gap in coverage.
  • If no new test is added, why not: N/A — 2 new tests added.

User-visible / Behavior Changes

On Windows, the gateway binds only 127.0.0.1 instead of both 127.0.0.1 and ::1. All existing IPv4 localhost traffic is unaffected. Users who explicitly need ::1 on Windows are unaffected in practice because the hang made ::1 unusable anyway.

Diagram (if applicable)

Before (Windows):
[request] -> [::1 dual-stack socket + 127.0.0.1 socket] -> TCP ESTABLISHED -> request event never fires -> hang

After (Windows):
[request] -> [127.0.0.1 socket only] -> TCP ESTABLISHED -> request event fires -> response

Security Impact (required)

  • New permissions/capabilities? No
  • Secrets/tokens handling changed? No
  • New/changed network calls? No
  • Command/tool execution surface changed? No
  • Data access scope changed? No

Repro + Verification

Environment

  • OS: Windows 11 Pro 10.0.26200
  • Runtime/container: Node.js, native process
  • Model/provider: N/A
  • Integration/channel (if any): Gateway HTTP server
  • Relevant config (redacted): Default gateway config, localhost binding

Steps

  1. Start gateway on Windows with default config
  2. Send any HTTP request to gateway (e.g. health check)
  3. Observe request hangs indefinitely — no response, no error

Expected

  • Gateway responds normally to all HTTP requests

Actual

  • All HTTP requests hang; gateway appears up (port bound) but never responds

Evidence

  • Failing test/log before + passing after
  • Trace/log snippets
  • Screenshot/recording
  • Perf numbers (if relevant)

pnpm test -- src/gateway/net.test.ts — 114/114 pass including 2 new Windows-specific tests asserting ::1 is skipped.

Human Verification (required)

  • Verified scenarios: Windows platform guard returns ["127.0.0.1"] only; non-Windows path unchanged; both new unit tests pass; full gateway test suite passes.
  • Edge cases checked: IPv6-only environments (not affected — Windows guard is platform-conditional); non-Windows platforms (unchanged behaviour verified).
  • What you did not verify: Live Windows hardware end-to-end (unit tests mock process.platform).

Review Conversations

  • I replied to or resolved every bot review conversation I addressed in this PR.
  • I left unresolved only the conversations that still need reviewer or maintainer judgment.

Compatibility / Migration

  • Backward compatible? Yes
  • Config/env changes? No
  • Migration needed? No

Risks and Mitigations

  • Risk: Users on Windows who rely on ::1 binding for some custom routing
    • Mitigation: The hang makes ::1 non-functional on Windows already — no real regression. If Windows IPv6-only support is needed in future, a dedicated UV_TCP_IPV6ONLY flag approach should be implemented separately.

Changed files

  • src/gateway/net.test.ts (modified, +21/-0)
  • src/gateway/net.ts (modified, +6/-0)

Code Example

Startup log excerpt:

text
17:04:39 [gateway] starting HTTP server...
17:04:39 [canvas] host mounted at http://127.0.0.1:18789/__openclaw__/canvas/
17:04:40 [gateway] ready (5 plugins...; 54.6s)
(No further log lines appear when curl request is made)

openclaw doctor output:

text
Health check failed: gateway timeout after 10000ms
  Gateway target: ws://127.0.0.1:18789
  Source: local loopback
netstat shows:

text
TCP    127.0.0.1:18789        0.0.0.0:0              LISTENING       68624
TCP    127.0.0.1:18789        127.0.0.1:xxxxx        ESTABLISHED     68624
RAW_BUFFERClick to expand / collapse

Bug type

Regression (worked before, now fails)

Beta release blocker

No

Summary

Gateway starts and binds to port 18789, but HTTP requests hang indefinitely after Request completely sent off. openclaw doctor health check times out after 10 seconds. TCP connection is established but no data is transmitted.

Steps to reproduce

Install OpenClaw 2026.4.15 globally via npm on Windows 11. Run openclaw gateway --port 18789 --verbose. In another terminal, run curl.exe -v http://127.0.0.1:18789/. Observe curl hangs after Request completely sent off. Run openclaw doctor and note Health check failed: gateway timeout after 10000ms.

Expected behavior

Gateway should return an HTTP response (e.g., 200 OK with HTML/JSON, or 404 Not Found). WebSocket health check should succeed.

Actual behavior

Gateway logs show readiness, but no HTTP response is ever sent. netstat confirms LISTENING and ESTABLISHED connections. No error logs appear in console or log file. openclaw doctor reports WebSocket timeout.

OpenClaw version

2026.4.15 (041266a)

Operating system

Windows 11 Pro (Build 22631)

Install method

npm global (npm install -g openclaw)

Model

N/A (issue occurs before any model interaction, at HTTP server level)

Provider / routing chain

N/A (local gateway not using external provider)

Additional provider/model setup details

N/A

Logs, screenshots, and evidence

Startup log excerpt:

text
17:04:39 [gateway] starting HTTP server...
17:04:39 [canvas] host mounted at http://127.0.0.1:18789/__openclaw__/canvas/
17:04:40 [gateway] ready (5 plugins...; 54.6s)
(No further log lines appear when curl request is made)

openclaw doctor output:

text
Health check failed: gateway timeout after 10000ms
  Gateway target: ws://127.0.0.1:18789
  Source: local loopback
netstat shows:

text
TCP    127.0.0.1:18789        0.0.0.0:0              LISTENING       68624
TCP    127.0.0.1:18789        127.0.0.1:xxxxx        ESTABLISHED     68624

Impact and severity

Security vulnerability Denial-of-service (local gateway unusable via HTTP/WebSocket) Routing Compliance issues Severity: High for Windows users. The gateway cannot serve any web UI or API requests, effectively breaking the core functionality.

Additional information

Disabling all plugins except talk-voice does not resolve the issue. Resetting openclaw.json to defaults does not help. Node.js version used: v24.12.0 (possible compatibility factor, not yet tested with v20 LTS). Workaround: CLI commands (openclaw chat, openclaw repl) still work.

extent analysis

TL;DR

The issue can be mitigated by investigating potential compatibility issues with Node.js version v24.12.0 and exploring workarounds such as using a different Node.js version.

Guidance

  • Verify the issue is specific to Node.js version v24.12.0 by testing with Node.js v20 LTS to determine if compatibility is the root cause.
  • Check for any known issues or updates related to OpenClaw and Node.js version compatibility.
  • Consider using CLI commands (openclaw chat, openclaw repl) as a temporary workaround for functionality.
  • Review the OpenClaw documentation and community resources for any reported issues or solutions related to HTTP requests hanging indefinitely.

Example

No specific code snippet is applicable in this case, as the issue appears to be related to compatibility and configuration rather than code.

Notes

The provided information suggests a potential compatibility issue with Node.js version v24.12.0, but further testing is required to confirm this. The fact that CLI commands still work suggests that the issue is specific to the HTTP server functionality.

Recommendation

Apply workaround: Test the application with a different Node.js version (e.g., v20 LTS) to determine if compatibility is the root cause and to find a temporary solution until the issue is fully resolved.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

FAQ

Expected behavior

Gateway should return an HTTP response (e.g., 200 OK with HTML/JSON, or 404 Not Found). WebSocket health check should succeed.

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

openclaw - ✅(Solved) Fix [Bug]: Gateway HTTP server hangs indefinitely on Windows (no response to any request, health check timeout) [1 pull requests, 1 comments, 2 participants]