-
-
Notifications
You must be signed in to change notification settings - Fork 69.5k
[Bug]: openclaw logs --follow fails after 2026.3.12 upgrade with handshake timeout while gateway remains healthy #44714
Description
Draft GitHub Issue — openclaw logs --follow fails after 2026.3.12 upgrade with handshake timeout while gateway remains healthy
Summary
After upgrading from 2026.3.11 to 2026.3.12, the gateway remains healthy and reachable locally, but openclaw logs --follow (and even one-shot openclaw logs) fails with:
gateway connect failed: Error: gateway closed (1000):
Gateway not reachable. Is it running and accessible?
The gateway is actually up. The live gateway log shows the real cause is a WebSocket handshake timeout:
{"cause":"handshake-timeout","handshake":"failed","durationMs":3770,"handshakeMs":3000}This makes the CLI report "Gateway not reachable" even though:
openclaw statusworksopenclaw gateway statusworks- local HTTP probe works
- the gateway is listening on loopback
Bug type
Regression (worked before, now fails)
OpenClaw version
- Worked on:
2026.3.11 - Fails on:
2026.3.12
Operating system
Linux (Ubuntu 22.04 LTS, arm64)
Install method
Global npm install / self-update on an existing local gateway install
Steps to reproduce
- Start with a working local gateway on
2026.3.11 - Update OpenClaw to
2026.3.12 - Verify the gateway is still healthy with:
openclaw statusopenclaw gateway status
- Run:
openclaw logs --follow
Expected behavior
openclaw logs --follow should tail the gateway log stream normally.
Actual behavior
The command fails immediately with:
gateway connect failed: Error: gateway closed (1000):
Gateway not reachable. Is it running and accessible?
Gateway target: ws://127.0.0.1:18789
Source: local loopback
At the same time, the gateway remains healthy and local status checks succeed.
Evidence that gateway is healthy
openclaw statussucceedsopenclaw gateway statussucceeds- HTTP on
127.0.0.1:18789returns200 - gateway log shows successful RPC activity for other methods (e.g.
status,config.get,chat.history)
Gateway log evidence
The live gateway log shows repeated handshake failures for the logs path:
{"cause":"handshake-timeout","handshake":"failed","durationMs":3591,"host":"127.0.0.1:18789","handshakeMs":3002}
{"cause":"handshake-timeout","handshake":"failed","durationMs":3770,"host":"127.0.0.1:18789","handshakeMs":3000}
{"cause":"handshake-timeout","handshake":"failed","durationMs":3782,"host":"127.0.0.1:18789","handshakeMs":3000}followed by:
gateway connect failed: Error: gateway closed (1000):
Additional code-level observation
In the installed 2026.3.12 package, the gateway bundle contains:
const DEFAULT_HANDSHAKE_TIMEOUT_MS = 3e3;So the default handshake timeout appears to be 3000 ms, while the observed handshake durations in failure cases are ~3.5–3.8 seconds.
Why this seems like a regression
- same local deployment worked before the upgrade
- gateway health/status paths still work after upgrade
- failure is isolated to the logs WebSocket path
- the error text is misleading because the gateway is reachable but the handshake times out
Workaround
Tail the file log directly instead of using openclaw logs --follow, e.g.:
tail -f "$(ls -t /tmp/openclaw/openclaw-*.log | head -n 1)"Suspected area
Possibly related to gateway/WebSocket handshake timing or pre-auth path changes, rather than a full gateway outage.