Skip to content

[Bug]: openclaw logs --follow fails after 2026.3.12 upgrade with handshake timeout while gateway remains healthy #44714

@anyech

Description

@anyech

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 status works
  • openclaw gateway status works
  • 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

  1. Start with a working local gateway on 2026.3.11
  2. Update OpenClaw to 2026.3.12
  3. Verify the gateway is still healthy with:
    • openclaw status
    • openclaw gateway status
  4. 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 status succeeds
  • openclaw gateway status succeeds
  • HTTP on 127.0.0.1:18789 returns 200
  • 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions