#gateway closed (1000):Gateway not reachable. Is it running and accessible?
1 messages · Page 1 of 1 (latest)
@tough pumice
hello
Diagnosis (read-only)
Gateway connection details:
Gateway target: ws://127.0.0.1:18789
Source: local loopback
Config: /root/.openclaw/openclaw.json
Bind: loopback
âś“ Config: /root/.openclaw/openclaw.json
âś“ Restart sentinel: none
! Port 18789
Port 18789 is already in use.
- pid 174904 root: openclaw-gateway (127.0.0.1:18789)
- Gateway already running locally. Stop it (openclaw gateway stop) or use a different port.
! Tailscale: off · unknown
error: Error: spawn tailscale ENOENT
✓ Skills: 21 eligible · 0 missing · /root/.openclaw/workspace
âś“ Channel issues (none)
Pasteable debug report. Auth tokens redacted.
Troubleshooting: https://docs.openclaw.ai/troubleshooting
@tough pumice hi,i don't know why
@tough pumice can you help me?
âžś ~ openclaw config get gateway.mode
openclaw config get gateway.bind
openclaw config get gateway.port
openclaw config get gateway.remote.url
🦞 OpenClaw 2026.3.12 (6472949) — Type the command with confidence—nature will provide the stack trace if needed.
local
🦞 OpenClaw 2026.3.12 (6472949) — Half butler, half debugger, full crustacean.
loopback
🦞 OpenClaw 2026.3.12 (6472949) — Your task has been queued; your dignity has been deprecated.
18789
🦞 OpenClaw 2026.3.12 (6472949) — I'll refactor your busywork like it owes me money.
Config path not found: gateway.remote.url
Yep — this error usually means one of two things:
- the Gateway process is not running, or
- your CLI is pointed at the wrong target/mode.
Run this exact quick check and paste output:
openclaw --version
openclaw gateway status --deep
openclaw doctor
openclaw gateway start
openclaw status --all
What I’m looking for in gateway status --deep:
Runtime: running(if not, startup failed)
RPC probe: ok(if failed, URL/auth/mode mismatch)
If it still says unreachable, also run:
openclaw config get gateway.mode
openclaw config get gateway.remote.url
If gateway.mode is remote by accident, your local ws://127.0.0.1:18789 checks will fail exactly like this.
Docs:
openclaw gateway status
openclaw gateway status --deep
🦞 OpenClaw 2026.3.12 (6472949) — I run on caffeine, JSON5, and the audacity of "it worked on my machine."
│
â—‡
Service: systemd (enabled)
File logs: /tmp/openclaw/openclaw-2026-03-19.log
Command: /usr/bin/node /usr/lib/node_modules/openclaw/dist/index.js gateway --port 18789
Service file: ~/.config/systemd/user/openclaw-gateway.service
Service env: OPENCLAW_GATEWAY_PORT=18789
Config (cli): ~/.openclaw/openclaw.json
Config (service): ~/.openclaw/openclaw.json
Gateway: bind=loopback (127.0.0.1), port=18789 (service args)
Probe target: ws://127.0.0.1:18789
Dashboard: http://127.0.0.1:18789/
Probe note: Loopback-only gateway; only local clients can connect.
Runtime: running (pid 834, state active, sub running, last exit 0, reason 0)
RPC probe: ok
Listening: 127.0.0.1:18789
Troubles: run openclaw status
Troubleshooting: https://docs.openclaw.ai/troubleshooting
🦞 OpenClaw 2026.3.12 (6472949) — No $999 stand required.
│
â—‡
Service: systemd (enabled)
File logs: /tmp/openclaw/openclaw-2026-03-19.log
Command: /usr/bin/node /usr/lib/node_modules/openclaw/dist/index.js gateway --port 18789
Service file: ~/.config/systemd/user/openclaw-gateway.service
Service env: OPENCLAW_GATEWAY_PORT=18789
Config (cli): ~/.openclaw/openclaw.json
Config (service): ~/.openclaw/openclaw.json
Gateway: bind=loopback (127.0.0.1), port=18789 (service args)
Probe target: ws://127.0.0.1:18789
Dashboard: http://127.0.0.1:18789/
Probe note: Loopback-only gateway; only local clients can connect.
Runtime: running (pid 834, state active, sub running, last exit 0, reason 0)
RPC probe: ok
Listening: 127.0.0.1:18789
Troubles: run openclaw status
Troubleshooting: https://docs.openclaw.ai/troubleshooting
âžś ~
every thing looks ok
Yep, absolutely — let’s fix it.
From your snippet, CLI is using /root/.openclaw/openclaw.json and trying local loopback (127.0.0.1:18789).
That usually means either the gateway isn’t started, or you’re in the wrong user profile.
Please run these and paste output:
openclaw --version
openclaw gateway status --deep
openclaw gateway start
openclaw gateway status
openclaw doctor
If still failing, run:
openclaw config get gateway.mode
openclaw config get gateway.remote.url
whoami
Quick note: if OpenClaw was installed under a different Linux user, running commands as root can show exactly this “not reachable” error (wrong ~/.openclaw state).
Once you paste those outputs, I’ll give you the exact next command.
Nice — this output is actually helpful.
gateway.mode = localâś…gateway.bind = loopbackâś…gateway.port = 18789âś…gateway.remote.urlmissing âś… (normal in local mode)
So config looks fine. The likely issue is just that the gateway process isn’t up (or exits on start).
Next run:
openclaw gateway status --deep
openclaw gateway start
openclaw gateway status --deep
openclaw doctor
If it still won’t stay up, do a service metadata refresh:
openclaw gateway install --force
openclaw gateway restart
openclaw gateway status --deep
Paste the gateway status --deep + doctor output and I’ll pinpoint the exact fix from there.
Perfect — this is healthy now ✅
Your gateway status --deep shows:
Runtime: runningRPC probe: ok- listening on
127.0.0.1:18789
So the gateway is up and reachable. The earlier gateway closed (1000) was likely from before service fully started (or a transient reconnect moment).
Now test full stack:
openclaw status --all
openclaw channels status --probe
openclaw logs --follow
If those look good, you’re unblocked.
If logs --follow still oddly says “not reachable” while gateway status says ok, paste:
echo "$OPENCLAW_URL"
(just to check no stale URL override in your shell)
Glad this moved forward 🎉
If this fixed it, please right-click the solution message → Apps → ✅ Mark Solution so Answer Overflow can index it.
Nice — then you’re good ✅
Yep, that earlier gateway closed (1000) was just from when the gateway wasn’t reachable at that moment.
Your latest status --deep is healthy, so no active issue now.
If it pops up again, quick recovery:
openclaw gateway restart
openclaw gateway status --deep
And if you want, tail the service log directly:
/tmp/openclaw/openclaw-2026-03-19.log
If this fixed it, please mark the solution (right-click message → Apps → ✅ Mark Solution) so it gets indexed for others.
âžś ~ echo "$OPENCLAW_URL"
âžś ~nothing output
@tough pumice âžś ~ echo "$OPENCLAW_URL"
âžś ~nothing output
Perfect — blank output there is expected ✅
That means no OPENCLAW_URL override is forcing a bad endpoint.
So right now everything points to: config is correct + gateway is healthy.
If the error appears again, grab these immediately after it happens:
openclaw gateway status --deep
openclaw doctor
That’ll catch it in the failing state. But if commands are working now, you’re all set.
Yep — OPENCLAW_URL being empty is correct 👍
So no URL override issue on your shell.
At this point, do one clean verification run:
openclaw gateway restart
openclaw gateway status --deep
openclaw status --all
If those are all green, you’re fully good and can ignore the earlier transient gateway closed (1000) message.
~ openclaw gateway status --deep
openclaw doctor
🦞 OpenClaw 2026.3.12 (6472949) — Your .env is showing; don't worry, I'll pretend I didn't see it.
│
â—‡
Service: systemd (enabled)
File logs: /tmp/openclaw/openclaw-2026-03-19.log
Command: /usr/bin/node /usr/lib/node_modules/openclaw/dist/index.js gateway --port 18789
Service file: ~/.config/systemd/user/openclaw-gateway.service
Service env: OPENCLAW_GATEWAY_PORT=18789
Config (cli): ~/.openclaw/openclaw.json
Config (service): ~/.openclaw/openclaw.json
Gateway: bind=loopback (127.0.0.1), port=18789 (service args)
Probe target: ws://127.0.0.1:18789
Dashboard: http://127.0.0.1:18789/
Probe note: Loopback-only gateway; only local clients can connect.
Runtime: running (pid 39612, state active, sub running, last exit 0, reason 0)
RPC probe: ok
Listening: 127.0.0.1:18789
Troubles: run openclaw status
Troubleshooting: https://docs.openclaw.ai/troubleshooting
Telegram: configured
Matrix: ok (8ms)
Agents: main (default)
Heartbeat interval: 30m (main)
Session store (main): /root/.openclaw/agents/main/sessions/sessions.json (5 entries)
- agent:main:main (11m ago)
- agent:main:matrix:direct:@wangyy:synapse.lulu (25m ago)
- agent:main:matrix:direct:@sunhao1256:synapse.lulu (690m ago)
- agent:main:telegram:direct:8713666123 (1026m ago)
- agent:main:telegram:slash:8713666123 (8122m ago)
Run "openclaw doctor --fix" to apply changes.
│
â”” Doctor complete.
skill odd error
openclaw logs --follow
🦞 OpenClaw 2026.3.12 (6472949) — iMessage green bubble energy, but for everyone.
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
Config: /root/.openclaw/openclaw.json
Bind: loopback
Hint: run openclaw doctor.
âžś ~
@tough pumice
This is fully healthy now âś…
Your latest output shows:
Runtime: runningRPC probe: okDoctor complete(no blocker)
So the gateway itself is fine. The earlier gateway closed (1000) was from a moment when it wasn’t reachable yet.
If you just want continuous logs regardless of CLI connect timing, tail the log file directly:
tail -f /tmp/openclaw/openclaw-2026-03-19.log
You’re unblocked.
If this solved it, please mark solution (right-click → Apps → ✅ Mark Solution) so others can find it fast.
{"0":"\u001b[38;5;167mgateway connect failed: Error: gateway closed (1000): \u001b[39m","_meta":{"runtime":"node","runtimeVersion":"22.22.1","hostname":"unknown","name":"openclaw","date":"2026-03-19T01:50:46.057Z","logLevelId":5,"logLevelName":"ERROR","path":{"fullFilePath":"file:///usr/lib/node_modules/openclaw/dist/subsystem-DVwhOlEq.js:977:68","fileName":"subsystem-DVwhOlEq.js","fileNameWithLine":"subsystem-DVwhOlEq.js:977","fileColumn":"68","fileLine":"977","filePath":"/usr/lib/node_modules/openclaw/dist/subsystem-DVwhOlEq.js","filePathWithLine":"/usr/lib/node_modules/openclaw/dist/subsystem-DVwhOlEq.js:977","method":"console.error"}},"time":"2026-03-19T01:50:46.069+00:00"}
{"0":"gateway connect failed: Error: gateway closed (1000): ","_meta":{"runtime":"node","runtimeVersion":"22.22.1","hostname":"unknown","name":"openclaw","date":"2026-03-19T01:50:46.076Z","logLevelId":5,"logLevelName":"ERROR","path":{"fullFilePath":"file:///usr/lib/node_modules/openclaw/dist/logger-CDI_b4HB.js:20:34","fileName":"logger-CDI_b4HB.js","fileNameWithLine":"logger-CDI_b4HB.js:20","fileColumn":"34","fileLine":"20","filePath":"/usr/lib/node_modules/openclaw/dist/logger-CDI_b4HB.js","filePathWithLine":"/usr/lib/node_modules/openclaw/dist/logger-CDI_b4HB.js:20","method":"logWithSubsystem"}},"time":"2026-03-19T01:50:46.076+00:00"}
@tough pumice {"0":"\u001b[38;5;167mgateway connect failed: Error: gateway closed (1000): \u001b[39m","_meta":{"runtime":"node","runtimeVersion":"22.22.1","hostname":"unknown","name":"openclaw","date":"2026-03-19T01:50:46.057Z","logLevelId":5,"logLevelName":"ERROR","path":{"fullFilePath":"file:///usr/lib/node_modules/openclaw/dist/subsystem-DVwhOlEq.js:977:68","fileName":"subsystem-DVwhOlEq.js","fileNameWithLine":"subsystem-DVwhOlEq.js:977","fileColumn":"68","fileLine":"977","filePath":"/usr/lib/node_modules/openclaw/dist/subsystem-DVwhOlEq.js","filePathWithLine":"/usr/lib/node_modules/openclaw/dist/subsystem-DVwhOlEq.js:977","method":"console.error"}},"time":"2026-03-19T01:50:46.069+00:00"}
{"0":"gateway connect failed: Error: gateway closed (1000): ","_meta":{"runtime":"node","runtimeVersion":"22.22.1","hostname":"unknown","name":"openclaw","date":"2026-03-19T01:50:46.076Z","logLevelId":5,"logLevelName":"ERROR","path":{"fullFilePath":"file:///usr/lib/node_modules/openclaw/dist/logger-CDI_b4HB.js:20:34","fileName":"logger-CDI_b4HB.js","fileNameWithLine":"logger-CDI_b4HB.js:20","fileColumn":"34","fileLine":"20","filePath":"/usr/lib/node_modules/openclaw/dist/logger-CDI_b4HB.js","filePathWithLine":"/usr/lib/node_modules/openclaw/dist/logger-CDI_b4HB.js:20","method":"logWithSubsystem"}},"time":"2026-03-19T01:50:46.076+00:00"}
Yep, that’s an odd one — and you’re not crazy.
Your gateway is clearly healthy (Runtime: running, RPC probe: ok), so this is likely a openclaw logs --follow CLI quirk on 2026.3.12, not an actual gateway outage.
Use this as workaround for now:
tail -f /tmp/openclaw/openclaw-2026-03-19.log
Then I’d do two cleanup steps:
openclaw doctor --fix
and update to latest OpenClaw patch (same install method you used, preferably via pnpm).
If it still happens after update, please file a GitHub issue with:
openclaw --versionopenclaw gateway status --deep- exact
openclaw logs --followoutput
https://github.com/openclaw/openclaw/issues
i can execute "openclaw logs --follow " comand ok?
@tough pumice âžś ~ openclaw logs --follow
🦞 OpenClaw 2026.3.12 (6472949) — If you can describe it, I can probably automate it—or at least make it funnier.
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
Config: /root/.openclaw/openclaw.json
Bind: loopback
Hint: ru
Short answer: no — that command is still failing on your setup.
But your gateway is healthy, so this is likely a logs --follow bug in 2026.3.12, not your config.
Use this instead right now:
tail -f /tmp/openclaw/openclaw-2026-03-19.log
Then update OpenClaw (preferred with pnpm), e.g.:
pnpm add -g openclaw@latest
openclaw --version
openclaw logs --follow