Files
proxmox/docs/09-troubleshooting/PUBLIC_RPC_WEBSOCKET_502.md
defiQUG b3a8fe4496
Some checks failed
Deploy to Phoenix / deploy (push) Has been cancelled
chore: sync all changes to Gitea
- Config, docs, scripts, and backup manifests
- Submodule refs unchanged (m = modified content in submodules)

Made-with: Cursor
2026-03-02 11:37:34 -08:00

1.8 KiB

Public RPC WebSocket 502 / upgrade_502

Status: Proxy/ingress configuration issue (not the RPC nodes themselves).

What you see

  • Script: scripts/verify/check-public-rpc-stability-e2e.sh reports WebSocket endpoints as warn with upgrade_502.
  • Meaning: The HTTPS→WebSocket upgrade request to the public WSS URL returns HTTP 502 Bad Gateway from the reverse proxy (e.g. NPMplus, Cloudflare, or ingress in front of the RPC).

Cause

  • RPC nodes (e.g. VMID 2201) serve WebSocket on port 8546 and are healthy.
  • The public WSS URLs (e.g. wss://rpc-ws-pub.d-bis.org) go through a proxy. If the proxy is not configured to forward WebSocket upgrades correctly, or the upstream is unreachable from the proxy, the proxy returns 502.

What to do

  1. Confirm RPC is fine: Run scripts/health/check-rpc-vms-health.sh and scripts/test-all-rpc-nodes.py — both should pass. HTTP public RPC usually passes (5/5).
  2. Fix proxy/ingress: On the host that serves the public WSS hostname (e.g. NPMplus or Cloudflare Tunnel):
    • Ensure the proxy has WebSocket support enabled for that host.
    • Ensure the proxy upstream points to the correct RPC host:port (e.g. http://192.168.11.221:8546 or the internal hostname) and that the proxy can reach it.
    • Restart the proxy after config changes.
  3. Full WebSocket test: Install wscat where you run the E2E check: npm i -g wscat (or use npx -y wscat). The script will then run a full WebSocket JSON-RPC test; if the proxy still returns 502, the failure is at the proxy, not wscat.
  • HTTP public RPC: If those pass, the RPC nodes and HTTP proxy path are OK; only the WebSocket path needs proxy fix.
  • Config: See docs/04-configuration/cloudflare/ and NPMplus proxy host settings for WSS domains.