openclaw - 💡(How to fix) Fix [Bug]: falling back to HTTP. error=Error: connect ENETUNREACH [1 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#58807Fetched 2026-04-08 02:32:27
View on GitHub
Comments
0
Participants
1
Timeline
2
Reactions
0
Participants
Timeline (top)
labeled ×2

Openclaw websocket connect to ws api.openapi.com doesn't respect HTTP_PROXY, HTTPS_PROXY, look like it direct connect to the server

openclaw-gateway-1 | 2026-03-31T23:49:35.300-07:00 [agent/embedded] [ws-stream] WebSocket connect failed for session=059e30ae-e63c-4baa-b0f5-1ba797673dae; falling back to HTTP. error=Error: connect ENETUNREACH 162.159.140.245:443 - Local (0.0.0.0:0)

Error Message

openclaw-gateway-1 | 2026-03-31T23:49:35.300-07:00 [agent/embedded] [ws-stream] WebSocket connect failed for session=059e30ae-e63c-4baa-b0f5-1ba797673dae; falling back to HTTP. error=Error: connect ENETUNREACH 162.159.140.245:443 - Local (0.0.0.0:0) openclaw-gateway-1 | 2026-03-31T23:49:35.300-07:00 [agent/embedded] [ws-stream] WebSocket connect failed for session=059e30ae-e63c-4baa-b0f5-1ba797673dae; falling back to HTTP. error=Error: connect ENETUNREACH 162.159.140.245:443 - Local (0.0.0.0:0)

Root Cause

Openclaw websocket connect to ws api.openapi.com doesn't respect HTTP_PROXY, HTTPS_PROXY, look like it direct connect to the server

openclaw-gateway-1 | 2026-03-31T23:49:35.300-07:00 [agent/embedded] [ws-stream] WebSocket connect failed for session=059e30ae-e63c-4baa-b0f5-1ba797673dae; falling back to HTTP. error=Error: connect ENETUNREACH 162.159.140.245:443 - Local (0.0.0.0:0)

RAW_BUFFERClick to expand / collapse

Bug type

Regression (worked before, now fails)

Beta release blocker

No

Summary

Openclaw websocket connect to ws api.openapi.com doesn't respect HTTP_PROXY, HTTPS_PROXY, look like it direct connect to the server

openclaw-gateway-1 | 2026-03-31T23:49:35.300-07:00 [agent/embedded] [ws-stream] WebSocket connect failed for session=059e30ae-e63c-4baa-b0f5-1ba797673dae; falling back to HTTP. error=Error: connect ENETUNREACH 162.159.140.245:443 - Local (0.0.0.0:0)

Steps to reproduce

export HTTP_PROXY and HTTPS_PROXY using openclaw then see the logs bellow openclaw-gateway-1 | 2026-03-31T23:49:35.300-07:00 [agent/embedded] [ws-stream] WebSocket connect failed for session=059e30ae-e63c-4baa-b0f5-1ba797673dae; falling back to HTTP. error=Error: connect ENETUNREACH 162.159.140.245:443 - Local (0.0.0.0:0)

Expected behavior

if there are any env that allow openclaw using proxy for websocket

Actual behavior

openclaw direct connect to api.openapi.com

OpenClaw version

v2026.3.28

Operating system

macOS

Install method

docker

Model

codex

Provider / routing chain

nginx -> docker -> openclaw -> squid proxy -> codex

Additional provider/model setup details

No response

Logs, screenshots, and evidence

Impact and severity

No response

Additional information

No response

extent analysis

TL;DR

  • Set the NO_PROXY environment variable or configure OpenClaw to use the HTTP_PROXY and HTTPS_PROXY environment variables for WebSocket connections.

Guidance

  • Verify that the HTTP_PROXY and HTTPS_PROXY environment variables are set correctly before running OpenClaw.
  • Check the OpenClaw documentation for any configuration options that allow specifying a proxy for WebSocket connections.
  • Consider setting the NO_PROXY environment variable to a specific value to see if it affects the behavior of OpenClaw.
  • Test the connection using a tool like curl to see if it respects the proxy settings.

Example

  • No code snippet is provided as there is no clear indication of the programming language or framework used.

Notes

  • The issue seems to be related to the fact that OpenClaw is not respecting the HTTP_PROXY and HTTPS_PROXY environment variables for WebSocket connections.
  • The provided logs indicate that OpenClaw is trying to connect directly to the server instead of using the proxy.

Recommendation

  • Apply workaround: Set the NO_PROXY environment variable or configure OpenClaw to use the HTTP_PROXY and HTTPS_PROXY environment variables for WebSocket connections, as it seems that OpenClaw is not respecting these variables by default.

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

if there are any env that allow openclaw using proxy for websocket

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 - 💡(How to fix) Fix [Bug]: falling back to HTTP. error=Error: connect ENETUNREACH [1 participants]