#Openclaw not working. Tried Version degradation, reinstall. Same problem

1 messages ยท Page 1 of 1 (latest)

crude arrow
#

akkarthikeyan@As-MacBook-Air ~ % openclaw doctor --fix

โ—‡ Gateway port โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฎ
โ”‚ โ”‚
โ”‚ Port 18789 is already in use. โ”‚
โ”‚ - pid 4117 akkarthikeyan: openclaw-gateway ([::1]:18789) โ”‚
โ”‚ - Gateway already running locally. Stop it (openclaw gateway stop) or โ”‚
โ”‚ use a different port. โ”‚
โ”‚ โ”‚
โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฏ
โ”‚
โ—‡ Gateway โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฎ
โ”‚ โ”‚
โ”‚ Runtime: running (pid 4117) โ”‚
โ”‚ โ”‚
โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฏ
โ”‚
โ—‡ Gateway โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฎ
โ”‚ โ”‚
โ”‚ LaunchAgent loaded; stopping requires "openclaw gateway stop" or โ”‚
โ”‚ launchctl bootout gui/$UID/ai.openclaw.gateway. โ”‚
โ”‚ โ”‚
โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฏ
Restarted LaunchAgent: gui/501/ai.openclaw.gateway
โ”‚
โ—‡
โ”‚
โ—‡ Gateway โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฎ
โ”‚ โ”‚
โ”‚ Gateway not running. โ”‚
โ”‚ โ”‚
โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฏ
โ”‚
โ—‡ Gateway connection โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฎ
โ”‚ โ”‚
โ”‚ Gateway target: ws://127.0.0.1:18789 โ”‚
โ”‚ Source: local loopback โ”‚
โ”‚ Config: /Users/akkarthikeyan/.openclaw/openclaw.json โ”‚
โ”‚ Bind: loopback โ”‚
โ”‚ โ”‚
โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฏ
โ”‚
โ”” Doctor complete.

knotty marshBOT
#

To help others find answers, you can mark your question as solved via Right click solution message -> Apps -> โœ… Mark Solution

cold tapirBOT
#

This means the gateway was running, then doctor --fix restarted the macOS LaunchAgent, and the LaunchAgent failed to come back up.

First thing: please paste this:

openclaw --version
which openclaw
node -v
openclaw gateway status
openclaw logs --tail 120

If openclaw logs canโ€™t read anything, use:

tail -n 120 "$(ls -t /tmp/openclaw/openclaw-*.log | head -1)"
#

Also useful on macOS:

launchctl print gui/$UID/ai.openclaw.gateway | grep -E 'Program|Arguments|node|openclaw'

My suspicion: this is a LaunchAgent / install path mismatch, especially if you downgraded/reinstalled or use nvm. The service may still point at an old Node/OpenClaw path even though your shell uses a different one.

Donโ€™t keep downgrading yet โ€” letโ€™s see the version + log tail first. Docs: https://docs.openclaw.ai/help/faq and https://docs.openclaw.ai/gateway/troubleshooting

crude arrow
#

Service: LaunchAgent (loaded)
File logs: /tmp/openclaw/openclaw-2026-04-28.log
Command: /Users/akkarthikeyan/.nvm/versions/node/v22.22.2/bin/node /usr/local/lib/node_modules/openclaw/dist/index.js gateway --port 18789
Service file: ~/Library/LaunchAgents/ai.openclaw.gateway.plist
Working dir: ~/.openclaw
Service env: OPENCLAW_GATEWAY_PORT=18789

Service config looks out of date or non-standard.
Service config issue: Gateway service PATH includes version managers or package managers; recommend a minimal PATH. (/Users/akkarthikeyan/.nvm/versions/node/v22.22.2/bin)
Service config issue: Gateway service uses Node from a version manager; it can break after upgrades. (/Users/akkarthikeyan/.nvm/versions/node/v22.22.2/bin/node)
Recommendation: run "openclaw doctor" (or "openclaw doctor --repair").
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 15164)
Warm-up: launch agents can take a few seconds. Try again shortly.
Connectivity probe: failed
Probe target: ws://127.0.0.1:18789
timeout
Capability: unknown

Port 18789 is already in use.

  • pid 15164 akkarthikeyan: openclaw-gateway ([::1]:18789)
  • Gateway already running locally. Stop it (openclaw gateway stop) or use a different port.
    Listening: [::1]:18789
    Troubles: run openclaw status
    Troubleshooting: https://docs.openclaw.ai/troubleshooting
    error: unknown option '--tail'
cold tapirBOT
#

Yep, this confirms a likely split-brain / LaunchAgent path issue.

Also: openclaw logs --tail was my bad โ€” that flag doesnโ€™t exist. Use --limit.

Please run this read-only block and paste the output:

openclaw --version
which -a openclaw
node -v
npm root -g
npm prefix -g
ls -l /Users/akkarthikeyan/.nvm/versions/node/v22.22.2/bin/node
ls -l /usr/local/lib/node_modules/openclaw/dist/index.js
openclaw logs --limit 300 --plain
#

If openclaw logs also times out, use the file directly:

tail -n 300 /tmp/openclaw/openclaw-2026-04-28.log

The suspicious part is:

/Users/.../.nvm/versions/node/v22.22.2/bin/node /usr/local/lib/node_modules/openclaw/dist/index.js

That mixes nvm Node with a /usr/local global OpenClaw install, and launchd does not load your shell/nvm environment. That often breaks after reinstall/downgrade.

Likely repair after we see logs:

crude arrow
#

๐Ÿฆž OpenClaw 2026.4.26 (be8c246)
One CLI to rule them all, and one more restart because you changed the port.

Restarted LaunchAgent: gui/501/ai.openclaw.gateway

๐Ÿฆž OpenClaw 2026.4.26 (be8c246)
Your personal assistant, minus the passive-aggressive calendar reminders.

โ”‚
โ—‡
Service: LaunchAgent (loaded)
File logs: /tmp/openclaw/openclaw-2026-04-28.log
Command: /Users/akkarthikeyan/.nvm/versions/node/v22.22.2/bin/node /usr/local/lib/node_modules/openclaw/dist/index.js gateway --port 18789
Service file: ~/Library/LaunchAgents/ai.openclaw.gateway.plist
Working dir: ~/.openclaw
Service env: OPENCLAW_GATEWAY_PORT=18789

Service config looks out of date or non-standard.
Service config issue: Gateway service PATH includes version managers or package managers; recommend a minimal PATH. (/Users/akkarthikeyan/.nvm/versions/node/v22.22.2/bin)
Service config issue: Gateway service uses Node from a version manager; it can break after upgrades. (/Users/akkarthikeyan/.nvm/versions/node/v22.22.2/bin/node)
Recommendation: run "openclaw doctor" (or "openclaw doctor --repair").
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 16005)
Warm-up: launch agents can take a few seconds. Try again shortly.
Connectivity probe: failed
Probe target: ws://127.0.0.1:18789
timeout
Capability: unknown

Port 18789 is already in use.

  • pid 16005 akkarthikeyan: openclaw-gateway ([::1]:18789)
  • Gateway already running locally. Stop it (openclaw gateway stop) or use a different port.
    Listening: [::1]:18789
    Troubles: run openclaw status
    Troubleshooting: https://docs.openclaw.ai/troubleshooting
    akkarthikeyan@As-MacBook-Air ~ %
cold tapirBOT
#

Good, version is current-ish now. The key bit is:

Runtime: running โ€ฆ Connectivity probe: failed / timeout

So this is not โ€œport already in use by another appโ€ โ€” the gateway process itself is listening, but itโ€™s not answering the WebSocket probe.

Next useful thing is the actual log. Please run:

tail -n 300 /tmp/openclaw/openclaw-2026-04-28.log

If itโ€™s huge/noisy, this filtered version is fine:

grep -Ei "error|fatal|exception|uncaught|failed|timeout|EADDR|listening|ready|migrat|panic" /tmp/openclaw/openclaw-2026-04-28.log | tail -n 120
#

Quick note: avoid pasting any API keys/tokens if the log somehow includes them.

The nvm LaunchAgent warning is still suspicious, but since the process is actually running and bound to 18789, the log should tell us whether itโ€™s hanging during startup, auth/device init, plugin loading, or a stale service wrapper.

crude arrow
#

rHhUC6qs.js:147","method":"logToFile"}},"time":"2026-04-28T21:06:34.618+05:30","hostname":"As-MacBook-Air.local","message":"Browser control listening on http://127.0.0.1:18791/ (auth=token)"}
{"0":"{"subsystem":"gateway"}","1":"gateway ready","_meta":{"runtime":"node","runtimeVersion":"22.22.2","hostname":"unknown","name":"{"subsystem":"gateway"}","parentNames":["openclaw"],"date":"2026-04-28T15:36:36.517Z","logLevelId":3,"logLevelName":"INFO","path":{"fullFilePath":"file:///usr/local/lib/node_modules/openclaw/dist/subsystem-rHhUC6qs.js:147:14","fileName":"subsystem-rHhUC6qs.js","fileNameWithLine":"subsystem-rHhUC6qs.js:147","fileColumn":"14","fileLine":"147","filePath":"/usr/local/lib/node_modules/openclaw/dist/subsystem-rHhUC6qs.js","filePathWithLine":"/usr/local/lib/node_modules/openclaw/dist/subsystem-rHhUC6qs.js:147","method":"logToFile"}},"time":"2026-04-28T21:06:36.517+05:30","hostname":"As-MacBook-Air.local","message":"gateway ready"}
akkarthikeyan@As-MacBook-Air ~ %

cold tapirBOT
#

That log is actually good news: the gateway reached gateway ready.

So now check whether the earlier timeout was just startup warm-up:

sleep 10
openclaw gateway status
openclaw status

If it still says Runtime: running but Connectivity probe: failed timeout, run these two checks:

curl -v --max-time 5 http://127.0.0.1:18789/ 2>&1 | tail -n 40
curl -g -v --max-time 5 'http://[::1]:18789/' 2>&1 | tail -n 40
#

Iโ€™m specifically checking whether the gateway is only reachable on IPv6 ::1 while the CLI probes 127.0.0.1, or whether the HTTP server is accepting connections but the WS probe is hanging.

Also, 2026.4.26 is slightly behind current docs/source; donโ€™t downgrade further. Letโ€™s get the status/curl output first, then we can decide whether to force-rewrite the LaunchAgent or update.

crude arrow
#

akkarthikeyan@As-MacBook-Air ~ % curl -v --max-time 5 http://127.0.0.1:18789/ 2>&1 | tail -n 40
curl -g -v --max-time 5 'http://[::1]:18789/' 2>&1 | tail -n 40
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0* Trying 127.0.0.1:18789...

  • Connected to 127.0.0.1 (127.0.0.1) port 18789

GET / HTTP/1.1
Host: 127.0.0.1:18789
User-Agent: curl/8.7.1
Accept: /

  • Request completely sent off
    0 0 0 0 0 0 0 0 --:--:-- 0:00:04 --:--:-- 0* Operation timed out after 5006 milliseconds with 0 bytes received
    0 0 0 0 0 0 0 0 --:--:-- 0:00:05 --:--:-- 0
  • Closing connection
    curl: (28) Operation timed out after 5006 milliseconds with 0 bytes received
    % Total % Received % Xferd Average Speed Time Time Time Current
    Dload Upload Total Spent Left Speed
    0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0* Trying [::1]:18789...
  • Connected to ::1 (::1) port 18789

GET / HTTP/1.1
Host: [::1]:18789
User-Agent: curl/8.7.1
Accept: /

  • Request completely sent off
    0 0 0 0 0 0 0 0 --:--:-- 0:00:04 --:--:-- 0* Operation timed out after 5002 milliseconds with 0 bytes received
    0 0 0 0 0 0 0 0 --:--:-- 0:00:05 --:--:-- 0
  • Closing connection
    curl: (28) Operation timed out after 5002 milliseconds with 0 bytes received
cold tapirBOT
#

That curl result is the important clue: the port accepts TCP, but the gateway never sends an HTTP response. So this is a wedged gateway process / event-loop hang, not โ€œwrong portโ€ and not normal warm-up.

Donโ€™t keep running doctor --fix for this loop. Please capture one sample before restarting:

PID=$(lsof -nP -tiTCP:18789 -sTCP:LISTEN | head -1)
ps -p "$PID" -o pid,etime,pcpu,pmem,command
sample "$PID" 5 -file /tmp/openclaw-gateway-sample.txt
tail -n 120 /tmp/openclaw-gateway-sample.txt

Then Iโ€™d try updating + rewriting the LaunchAgent metadata:

openclaw update
openclaw gateway install --force
#
openclaw gateway restart
sleep 10
openclaw gateway status
curl -v --max-time 5 http://127.0.0.1:18789/ 2>&1 | tail -n 40

If it still hangs after that, do a temporary plugin isolation test:

cp ~/.openclaw/openclaw.json ~/.openclaw/openclaw.json.bak-$(date +%Y%m%d-%H%M%S)
openclaw config set plugins.enabled false
openclaw gateway restart
sleep 10
curl -v --max-time 5 http://127.0.0.1:18789/ 2>&1 | tail -n 40
#

To undo that diagnostic change later:

openclaw config unset plugins.enabled
openclaw gateway restart

Please paste the sample output + whether disabling plugins changes the curl result. That should tell us whether this is a 2026.4.26 startup/plugin hang or something deeper in the service/runtime.

crude arrow
#

Service config looks out of date or non-standard.
Service config issue: Gateway service PATH includes version managers or package managers; recommend a minimal PATH. (/Users/akkarthikeyan/.nvm/versions/node/v22.22.2/bin)
Service config issue: Gateway service uses Node from a version manager; it can break after upgrades. (/Users/akkarthikeyan/.nvm/versions/node/v22.22.2/bin/node)
Recommendation: run "openclaw doctor" (or "openclaw doctor --repair").
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 17584)
Warm-up: launch agents can take a few seconds. Try again shortly.
Connectivity probe: failed
Probe target: ws://127.0.0.1:18789
timeout
Capability: unknown

Port 18789 is already in use.

  • pid 17584 akkarthikeyan: openclaw-gateway (127.0.0.1:18789)
  • Gateway already running locally. Stop it (openclaw gateway stop) or use a different port.
    Listening: 127.0.0.1:18789
    Troubles: run openclaw status
    Troubleshooting: https://docs.openclaw.ai/troubleshooting
    % Total % Received % Xferd Average Speed Time Time Time Current
    Dload Upload Total Spent Left Speed
    0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0* Trying 127.0.0.1:18789...
  • Connected to 127.0.0.1 (127.0.0.1) port 18789

GET / HTTP/1.1
Host: 127.0.0.1:18789
User-Agent: curl/8.7.1
Accept: /

  • Request completely sent off
    0 0 0 0 0 0 0 0 --:--:-- 0:00:04 --:--:-- 0* Operation timed out after 5005 milliseconds with 0 bytes received
    0 0 0 0 0 0 0 0 --:--:-- 0:00:05 --:--:-- 0
  • Closing connection
    curl: (28) Operation timed out after 5005 milliseconds with 0 bytes received
cold tapirBOT
#

This is still the same failure: TCP connects, HTTP never responds. So the gateway process is alive but wedged.

Please donโ€™t run doctor --fix again for now. Next do this:

PID=$(lsof -nP -tiTCP:18789 -sTCP:LISTEN | head -1)
ps -p "$PID" -o pid,etime,pcpu,pmem,command
sample "$PID" 5 -file /tmp/openclaw-gateway-sample.txt
tail -n 120 /tmp/openclaw-gateway-sample.txt

Then try the plugin isolation test:

cp ~/.openclaw/openclaw.json ~/.openclaw/openclaw.json.bak-$(date +%Y%m%d-%H%M%S)
openclaw config set plugins.enabled false
#
openclaw gateway restart
sleep 10
openclaw gateway status
curl -v --max-time 5 http://127.0.0.1:18789/ 2>&1 | tail -n 40

If that fixes curl/status, weโ€™ve narrowed it to startup/plugin loading. Undo later with:

openclaw config unset plugins.enabled
openclaw gateway restart

Also worth updating after the sample:

crude arrow
#

Service config looks out of date or non-standard.
Service config issue: Gateway service PATH includes version managers or package managers; recommend a minimal PATH. (/Users/akkarthikeyan/.nvm/versions/node/v22.22.2/bin)
Service config issue: Gateway service uses Node from a version manager; it can break after upgrades. (/Users/akkarthikeyan/.nvm/versions/node/v22.22.2/bin/node)
Recommendation: run "openclaw doctor" (or "openclaw doctor --repair").
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 18211)
Warm-up: launch agents can take a few seconds. Try again shortly.
Connectivity probe: failed
Probe target: ws://127.0.0.1:18789
timeout
Capability: unknown

Port 18789 is already in use.

  • pid 18211 akkarthikeyan: openclaw-gateway (127.0.0.1:18789)
  • Gateway already running locally. Stop it (openclaw gateway stop) or use a different port.
    Listening: 127.0.0.1:18789
    Troubles: run openclaw status
    Troubleshooting: https://docs.openclaw.ai/troubleshooting
    % Total % Received % Xferd Average Speed Time Time Time Current
    Dload Upload Total Spent Left Speed
    0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0* Trying 127.0.0.1:18789...
  • Connected to 127.0.0.1 (127.0.0.1) port 18789

GET / HTTP/1.1
Host: 127.0.0.1:18789
User-Agent: curl/8.7.1
Accept: /

  • Request completely sent off
    0 0 0 0 0 0 0 0 --:--:-- 0:00:04 --:--:-- 0* Operation timed out after 5003 milliseconds with 0 bytes received
    0 0 0 0 0 0 0 0 --:--:-- 0:00:05 --:--:-- 0
  • Closing connection
    curl: (28) Operation timed out after 5003 milliseconds with 0 bytes received
cold tapirBOT
#

Youโ€™re still showing the same status/curl result โ€” that confirms the diagnosis, but it doesnโ€™t give the next clue.

Please run this exact read-only block and paste the output:

PID=$(lsof -nP -tiTCP:18789 -sTCP:LISTEN | head -1)
echo "PID=$PID"
ps -p "$PID" -o pid,etime,pcpu,pmem,command
sample "$PID" 5 -file /tmp/openclaw-gateway-sample.txt
tail -n 120 /tmp/openclaw-gateway-sample.txt

The gateway is accepting connections but not responding, so we need the macOS sample to see what the Node process is stuck doing.

After that, donโ€™t run doctor --fix again โ€” itโ€™s just restarting into the same wedged state.

crude arrow
#

akkarthikeyan@As-MacBook-Air ~ % PID=$(lsof -nP -tiTCP:18789 -sTCP:LISTEN | head -1)
echo "PID=$PID"
ps -p "$PID" -o pid,etime,pcpu,pmem,command
sample "$PID" 5 -file /tmp/openclaw-gateway-sample.txt
tail -n 120 /tmp/openclaw-gateway-sample.txt
PID=18211
PID ELAPSED %CPU %MEM COMMAND
18211 01:57 48.8 5.3 openclaw-gateway
Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/3.13/bin/sample", line 5, in <module>
from sample import main
ModuleNotFoundError: No module named 'sample'
tail: /tmp/openclaw-gateway-sample.txt: No such file or directory
akkarthikeyan@As-MacBook-Air ~ %

cold tapirBOT
#

Nice, this is a real clue:

  • openclaw-gateway is using ~49% CPU
  • HTTP accepts connections but never responds

That strongly suggests a busy loop / event-loop spin inside the gateway.

Your sample command is being shadowed by a broken Python sample script. Use macOSโ€™s system tool directly:

PID=$(lsof -nP -tiTCP:18789 -sTCP:LISTEN | head -1)
echo "PID=$PID"
command -v sample
/usr/bin/sample "$PID" 5 -file /tmp/openclaw-gateway-sample.txt
tail -n 160 /tmp/openclaw-gateway-sample.txt
#

Then please also try the isolation test:

cp ~/.openclaw/openclaw.json ~/.openclaw/openclaw.json.bak-$(date +%Y%m%d-%H%M%S)
openclaw config set plugins.enabled false
openclaw gateway restart
sleep 10
openclaw gateway status
curl -v --max-time 5 http://127.0.0.1:18789/ 2>&1 | tail -n 40

If disabling plugins fixes it, undo later with:

openclaw config unset plugins.enabled
openclaw gateway restart
#

Paste the /usr/bin/sample tail + plugin-disabled result. That should narrow this down fast.

crude arrow
#

Runtime: running (pid 18649)
Warm-up: launch agents can take a few seconds. Try again shortly.
Connectivity probe: failed
Probe target: ws://127.0.0.1:18789
timeout
Capability: unknown

Port 18789 is already in use.

  • pid 18649 akkarthikeyan: openclaw-gateway (127.0.0.1:18789)
  • Gateway already running locally. Stop it (openclaw gateway stop) or use a different port.
    Listening: 127.0.0.1:18789
    Troubles: run openclaw status
    Troubleshooting: https://docs.openclaw.ai/troubleshooting
    % Total % Received % Xferd Average Speed Time Time Time Current
    Dload Upload Total Spent Left Speed
    0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0* Trying 127.0.0.1:18789...
  • Connected to 127.0.0.1 (127.0.0.1) port 18789

GET / HTTP/1.1
Host: 127.0.0.1:18789
User-Agent: curl/8.7.1
Accept: /

  • Request completely sent off
    0 0 0 0 0 0 0 0 --:--:-- 0:00:04 --:--:-- 0* Operation timed out after 5006 milliseconds with 0 bytes received
    0 0 0 0 0 0 0 0 --:--:-- 0:00:05 --:--:-- 0
  • Closing connection
    curl: (28) Operation timed out after 5006 milliseconds with 0 bytes received
    akkarthikeyan@As-MacBook-Air ~ % openclaw config unset plugins.enabled
    openclaw gateway restart

๐Ÿฆž OpenClaw 2026.4.26 (be8c246)
Shell yeahโ€”I'm here to pinch the toil and leave you the glory.

Config overwrite: /Users/akkarthikeyan/.openclaw/openclaw.json (sha256 29883805937a372306a5b4ffa7812288c2a74adb1f038be13f5fff7f1357c556 -> c698eca81ea6d8c35fd0f39e43b7491e5cd60ab959a27ec4c71597b399c4b437, backup=/Users/akkarthikeyan/.openclaw/openclaw.json.bak)
Removed plugins.enabled. Restart the gateway to apply.

๐Ÿฆž OpenClaw 2026.4.26 (be8c246) โ€” Ah, the fruit tree company! ๐ŸŽ

Restarted LaunchAgent: gui/501/ai.openclaw.gateway
akkarthikeyan@As-MacBook-Air ~ %

cold tapirBOT
#

You accidentally ran the undo command:

openclaw config unset plugins.enabled

That removes the diagnostic setting. The test I need is the opposite:

openclaw config set plugins.enabled false
openclaw gateway restart
sleep 10
openclaw gateway status
curl -v --max-time 5 http://127.0.0.1:18789/ 2>&1 | tail -n 40

Also please run the macOS sampler with the full path, because your shellโ€™s sample is a broken Python script:

#
PID=$(lsof -nP -tiTCP:18789 -sTCP:LISTEN | head -1)
echo "PID=$PID"
/usr/bin/sample "$PID" 5 -file /tmp/openclaw-gateway-sample.txt
tail -n 160 /tmp/openclaw-gateway-sample.txt

One extra note: I checked npm, and 2026.4.26 is currently the latest stable, so openclaw update probably wonโ€™t move you unless you switch channels. The high CPU + no HTTP response is the main clue now.

crude arrow
#

0x7ffc1ccf8000 - 0x7ffc1cd2bfff com.apple.WindowManagement (175.400) <A3BFEF51-C5A3-3F5F-A337-B194B61A1D69> /System/Library/PrivateFrameworks/WindowManagement.framework/Versions/A/WindowManagement
0x7ffc23c27000 - 0x7ffc23cc7fe7 libAppleArchive.dylib (405.100.1.702.1) <732E04D5-1BA3-356E-ADF2-00990EE5FF8B> /usr/lib/libAppleArchive.dylib
0x7ffc23d62000 - 0x7ffc23d63ff9 libBASupport.dylib (162.140.2) <9C7C56F3-4BC0-3D5F-96B3-9B8024E67706> /usr/lib/libBASupport.dylib
0x7ffc23d75000 - 0x7ffc23d82ff8 libCoreEntitlements.dylib (53.100.4) <BEBBBB7F-0326-3A5A-9BEA-E459CC2D55F3> /usr/lib/libCoreEntitlements.dylib
0x7ffc23ea0000 - 0x7ffc23ea7fff libRosetta.dylib (318.9) <D5197D37-8F13-3189-880E-5CFD7D87899C> /usr/lib/libRosetta.dylib
0x7ffc23ee4000 - 0x7ffc23eeeff0 libTLE.dylib (53.100.4) <3DC312C3-073F-39AA-A01C-5D6DD6222E7C> /usr/lib/libTLE.dylib
0x7ffc253c5000 - 0x7ffc2541afff libswift_Concurrency.dylib (5.10 - 5.10.0.12.11) <66126279-2274-3A36-9726-6166DA401EE6> /usr/lib/swift/libswift_Concurrency.dylib
0x7ffc25452000 - 0x7ffc254ffff7 libswift_RegexParser.dylib (5.10 - 5.10.0.12.11) <84FA207B-9BF6-3E5E-B9B9-DBD84C697885> /usr/lib/swift/libswift_RegexParser.dylib
0x7ffc25500000 - 0x7ffc25587ff7 libswift_StringProcessing.dylib (5.10 - 5.10.0.12.11) <F7C5DB27-1DFD-3983-A219-8E77BC07435F> /usr/lib/swift/libswift_StringProcessing.dylib
0x7ffc256f3000 - 0x7ffc256f6ff3 libsystem_darwindirectory.dylib (86.0.2) <2D6BA40E-D57F-35C6-853A-79AD5F7679F6> /usr/lib/system/libsystem_darwindirectory.dylib
0x7ffc256f7000 - 0x7ffc256f9fff libsystem_eligibility.dylib (47.140.3) <B4FA092F-D26B-3A94-B33D-854AFE3CACC3> /usr/lib/system/libsystem_eligibility.dylib
0x7ffc256fa000 - 0x7ffc256fcff7 libsystem_sanitizers.dylib (8) <9EC3BBEB-FBEE-3056-B311-D7BDB6ECAF40> /usr/lib/system/libsystem_sanitizers.dylib
akkarthikeyan@As-MacBook-Air ~ %

cold tapirBOT
#

That snippet is just the Binary Images section from the bottom of the sample โ€” unfortunately thatโ€™s the least useful part.

Please paste the top / call graph instead:

sed -n '1,220p' /tmp/openclaw-gateway-sample.txt
grep -n -E "Call graph|Thread|openclaw|node|v8|uv_run|JavaScript|RegExp|sqlite|lancedb|plugin" /tmp/openclaw-gateway-sample.txt | head -100

And please run the plugin isolation test exactly โ€” earlier you ran unset, which undid it:

openclaw config set plugins.enabled false
openclaw gateway restart
sleep 10
openclaw gateway status
#
curl -v --max-time 5 http://127.0.0.1:18789/ 2>&1 | tail -n 40

If plugins.enabled false fixes it, we know this is a plugin/startup loop. If it still hangs, the sample call graph is the next clue.

crude arrow
#

akkarthikeyan@As-MacBook-Air ~ % sed -n '1,220p' /tmp/openclaw-gateway-sample.txt
grep -n -E "Call graph|Thread|openclaw|node|v8|uv_run|JavaScript|RegExp|sqlite|lancedb|plugin" /tmp/openclaw-gateway-sample.txt | head -100
Analysis of sampling node (pid 19516) every 1 millisecond
Process: node [19516]
Path: /Users/USER/*/node
Load Address: 0x103ee3000
Identifier: node
Version: 0
Code Type: X86-64
Platform: macOS
Parent Process: ??? [1]

Date/Time: 2026-04-28 21:50:57.229 +0530
Launch Time: 2026-04-28 21:49:59.057 +0530
OS Version: macOS 14.8.5 (23J423)
Report Version: 7
Analysis Tool: /usr/bin/sample

Physical footprint: 458.1M
Physical footprint (peak): 468.4M
Idle exit: untracked

Call graph:
3730 Thread_324940 DispatchQueue_1: com.apple.main-thread (serial)
+ 3720 start (in dyld) + 1909 [0x7ff80bf85345]
+ ! 3720 node::Start(int, char**) (in node) + 766 [0x103fb44ae]
+ ! 3720 node::NodeMainInstance::Run() (in node) + 302 [0x1040522ae]
+ ! 3720 node::SpinEventLoopInternal(node::Environment*) (in node) + 309 [0x103ee6ae5]
+ ! 3720 uv_run (in node) + 432 [0x104ce76f0]
+ ! 3720 uv__io_poll (in node) + 1558 [0x104cfc356]
+ ! 3720 uv__async_io (in node) + 321 [0x104ce7171]
+ ! 3720 uv__work_done (in node) + 185 [0x104ce2929]
+ ! 3720 node::MakeLibuvRequestCallback<uv_fs_s, void ()(uv_fs_s)>::Wrapper(uv_fs_s*) (in node) + 99 [0x103ff5883]
+ ! 3720 node::fs::FileHandle::ClosePromise()::$_0::__invoke(uv_fs_s*) (in node) + 543 [0x104021eff]
+ ! 3720 node::fs::FileHandle::CloseReq::Resolve()

cold tapirBOT
#

This sample is useful: the gateway is spinning in Node/libuv file-handle close callbacks, not serving HTTP. Also: Code Type: X86-64 is suspicious on a MacBook Air โ€” if this is Apple Silicon, youโ€™re running the gateway under Rosetta.

Please run:

uname -m
node -p "process.arch"
file "$(which node)"
file /Users/akkarthikeyan/.nvm/versions/node/v22.22.2/bin/node

If uname -m is arm64 but Node is x86_64, Iโ€™d fix that first:

  1. Install/use an arm64 Node โ€” preferably Homebrew Node, or reinstall nvm from an arm64 terminal.
  2. Reinstall OpenClaw from that Node.
  3. Rewrite the LaunchAgent:
#
openclaw gateway stop
openclaw gateway install --force
openclaw gateway restart
sleep 10
openclaw gateway status

Also still run this isolation test, because it tells us whether plugins trigger the spin:

openclaw config set plugins.enabled false
openclaw gateway restart
sleep 10
openclaw gateway status
curl -v --max-time 5 http://127.0.0.1:18789/ 2>&1 | tail -n 40
crude arrow
#

i am using Intel Based Air

cold tapirBOT
#

Ah okay โ€” then X86-64 is normal. Thanks, that rules out the Rosetta path.

The sample now points to a Node/libuv spin, so the next best split is still: does it happen with plugins disabled?

Please run this exact block:

openclaw config set plugins.enabled false
openclaw gateway restart
sleep 10
openclaw gateway status
curl -v --max-time 5 http://127.0.0.1:18789/ 2>&1 | tail -n 40

If that works, the workaround is to keep plugins off temporarily and then we can narrow which plugin causes it.

If it still times out, please file a GitHub issue with:

#
  • OpenClaw 2026.4.26
  • Intel macOS 14.8.5
  • symptom: gateway says ready, TCP connects, HTTP/WS never respond, ~50% CPU
  • /tmp/openclaw-gateway-sample.txt
  • /tmp/openclaw/openclaw-2026-04-28.log

Issue tracker: https://github.com/openclaw/openclaw/issues

crude arrow
#

Service config issue: Gateway service uses Node from a version manager; it can break after upgrades. (/Users/akkarthikeyan/.nvm/versions/node/v22.22.2/bin/node)
Recommendation: run "openclaw doctor" (or "openclaw doctor --repair").
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 19915)
Warm-up: launch agents can take a few seconds. Try again shortly.
Connectivity probe: failed
Probe target: ws://127.0.0.1:18789
timeout
Capability: unknown

Port 18789 is already in use.

  • pid 19915 akkarthikeyan: openclaw-gateway (127.0.0.1:18789)
  • Gateway already running locally. Stop it (openclaw gateway stop) or use a different port.
    Listening: 127.0.0.1:18789
    Troubles: run openclaw status
    Troubleshooting: https://docs.openclaw.ai/troubleshooting
    % Total % Received % Xferd Average Speed Time Time Time Current
    Dload Upload Total Spent Left Speed
    0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0* Trying 127.0.0.1:18789...
  • Connected to 127.0.0.1 (127.0.0.1) port 18789

GET / HTTP/1.1
Host: 127.0.0.1:18789
User-Agent: curl/8.7.1
Accept: /

  • Request completely sent off
    0 0 0 0 0 0 0 0 --:--:-- 0:00:04 --:--:-- 0* Operation timed out after 5006 milliseconds with 0 bytes received
    0 0 0 0 0 0 0 0 --:--:-- 0:00:05 --:--:-- 0
  • Closing connection
    curl: (28) Operation timed out after 5006 milliseconds with 0 bytes received
    akkarthikeyan@As-MacBook-Air ~ %
cold tapirBOT
#

Got it โ€” even after restart itโ€™s still wedged. At this point Iโ€™d stop chasing doctor --fix; the persistent warning is the thing to clean up:

service uses nvm Node + /usr/local/lib/node_modules/openclaw

That mixed install can get weird under LaunchAgent. Letโ€™s make the service use a stable system Node/OpenClaw path.

On Intel macOS, try:

which -a node openclaw
/usr/local/bin/node -v
/usr/local/bin/openclaw --version

If /usr/local/bin/node exists, rewrite the service with a clean PATH:

#
openclaw gateway stop

env PATH="/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin" \
  /usr/local/bin/openclaw gateway install --force

env PATH="/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin" \
  /usr/local/bin/openclaw gateway restart

sleep 10
openclaw gateway status
curl -v --max-time 5 http://127.0.0.1:18789/ 2>&1 | tail -n 40

If /usr/local/bin/node does not exist, install a system/Homebrew Node first:

#
brew install node
npm i -g openclaw@latest

Then run the service rewrite block above.

This should stop LaunchAgent from using the nvm Node path. Your ~/.openclaw config/state wonโ€™t be deleted by this.

crude arrow
#

Service config looks out of date or non-standard.
Service config issue: Gateway service PATH includes version managers or package managers; recommend a minimal PATH. (/Users/akkarthikeyan/.nvm/versions/node/v22.22.2/bin)
Recommendation: run "openclaw doctor" (or "openclaw doctor --repair").
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 20356)
Warm-up: launch agents can take a few seconds. Try again shortly.
Connectivity probe: failed
Probe target: ws://127.0.0.1:18789
timeout
Capability: unknown

Port 18789 is already in use.

  • pid 20356 akkarthikeyan: openclaw-gateway (127.0.0.1:18789)
  • Gateway already running locally. Stop it (openclaw gateway stop) or use a different port.
    Listening: 127.0.0.1:18789
    Troubles: run openclaw status
    Troubleshooting: https://docs.openclaw.ai/troubleshooting
    % Total % Received % Xferd Average Speed Time Time Time Current
    Dload Upload Total Spent Left Speed
    0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0* Trying 127.0.0.1:18789...
  • Connected to 127.0.0.1 (127.0.0.1) port 18789

GET / HTTP/1.1
Host: 127.0.0.1:18789
User-Agent: curl/8.7.1
Accept: /

  • Request completely sent off
    0 0 0 0 0 0 0 0 --:--:-- 0:00:04 --:--:-- 0* Operation timed out after 5006 milliseconds with 0 bytes received
    0 0 0 0 0 0 0 0 --:--:-- 0:00:05 --:--:-- 0
  • Closing connection
    curl: (28) Operation timed out after 5006 milliseconds with 0 bytes received
    akkarthikeyan@As-MacBook-Air ~ %
cold tapirBOT
#

This is still the same output โ€” it doesnโ€™t show the plugin test or LaunchAgent rewrite, so we havenโ€™t changed the variable yet.

Please run only this, not doctor --fix:

openclaw config set plugins.enabled false
openclaw config get plugins.enabled
openclaw gateway restart
sleep 10
openclaw gateway status
curl -v --max-time 5 http://127.0.0.1:18789/ 2>&1 | tail -n 40

Expected middle line should print false.

If it still times out with plugins.enabled=false, then run:

#
which -a node openclaw
node -v
npm prefix -g
npm root -g

Right now weโ€™re stuck because every paste is showing the same wedged gateway state. We need to confirm whether disabling plugins changes anything.

crude arrow
#

Security audit
Summary: 0 critical ยท 1 warn ยท 1 info
WARN Reverse proxy headers are not trusted
gateway.bind is loopback and gateway.trustedProxies is empty. If you expose the Control UI through a reverse proxy, configure trusted proxies so local-client cโ€ฆ
Fix: Set gateway.trustedProxies to your proxy IPs or keep the Control UI local-only.
Full report: openclaw security audit
Deep probe: openclaw security audit --deep

Channels
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚ Channel โ”‚ Enabled โ”‚ State โ”‚ Detail โ”‚
โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

Sessions
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚ Key โ”‚ Kind โ”‚ Age โ”‚ Model โ”‚ Tokens โ”‚
โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
โ”‚ agent:main:main โ”‚ direct โ”‚ 34m ago โ”‚ gpt-5.5 โ”‚ 39k/272k (14%) โ”‚
โ”‚ agent:main:telegram:defau โ”‚ direct โ”‚ 3h ago โ”‚ gpt-5.5 โ”‚ 20k/272k (7%) โ”‚
โ”‚ lt:dirโ€ฆ โ”‚ โ”‚ โ”‚ โ”‚

cold tapirBOT
#

Oh! This looks like progress โ€” openclaw status is now reaching the gateway and listing sessions/channels. ๐ŸŽ‰

Please confirm with:

openclaw gateway status
curl -I --max-time 5 http://127.0.0.1:18789/
openclaw config get plugins.enabled

If gateway status now says Connectivity probe: ok, then the core gateway is fixed.

Two notes:

  • The โ€œReverse proxy headers are not trustedโ€ warning is not blocking for local-only loopback. You can ignore it unless youโ€™re exposing Control UI through a reverse proxy.
  • If plugins.enabled prints false, then disabling plugins is probably what made the gateway responsive. In that case, keep it disabled for now and file an issue with the sample/logs so the plugin startup spin can be fixed: https://github.com/openclaw/openclaw/issues
crude arrow
#

ห‡โ”‚
โ—‡
Service: LaunchAgent (loaded)
File logs: /tmp/openclaw/openclaw-2026-04-28.log
Command: /usr/local/bin/node /usr/local/lib/node_modules/openclaw/dist/index.js gateway --port 18789
Service file: ~/Library/LaunchAgents/ai.openclaw.gateway.plist
Working dir: ~/.openclaw
Service env: OPENCLAW_GATEWAY_PORT=18789

Service config looks out of date or non-standard.
Service config issue: Gateway service PATH includes version managers or package managers; recommend a minimal PATH. (/Users/akkarthikeyan/.nvm/versions/node/v22.22.2/bin)
Recommendation: run "openclaw doctor" (or "openclaw doctor --repair").
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 20808)
Warm-up: launch agents can take a few seconds. Try again shortly.
Connectivity probe: failed
Probe target: ws://127.0.0.1:18789
timeout
Capability: unknown

Port 18789 is already in use.

  • pid 20808 akkarthikeyan: openclaw-gateway (127.0.0.1:18789)
  • Gateway already running locally. Stop it (openclaw gateway stop) or use a different port.
    Listening: 127.0.0.1:18789
    Troubles: run openclaw status
    Troubleshooting: https://docs.openclaw.ai/troubleshooting
    curl: (28) Operation timed out after 5003 milliseconds with 0 bytes received

๐Ÿฆž OpenClaw 2026.4.26 (be8c246)
I'm the reason your shell history looks like a hacker-movie montage.

false
akkarthikeyan@As-MacBook-Air ~ %

cold tapirBOT
#

Okay, plugins.enabled=false did not fix it, and the service now uses /usr/local/bin/node, so weโ€™ve narrowed it further.

Next isolate browser/canvas startup โ€” the earlier logs showed browser control starting, and the sample had macOS UI frameworks loaded.

Run:

openclaw config set browser.enabled false
openclaw config set plugins.entries.browser.enabled false
openclaw config set canvasHost.enabled false
openclaw gateway restart
sleep 10
openclaw gateway status
curl -v --max-time 5 http://127.0.0.1:18789/ 2>&1 | tail -n 40

If that works, leave those disabled for now.

#

If it still times out, this is likely a 2026.4.26 gateway/runtime bug on Intel macOS. Please file an issue with:

  • OpenClaw 2026.4.26
  • Intel MacBook Air, macOS 14.8.5
  • plugins.enabled=false still hangs
  • TCP connects, HTTP never responds
  • high CPU, sample shows FileHandle::CloseReq::Resolve

Issue tracker: https://github.com/openclaw/openclaw/issues

crude arrow
#

Service config looks out of date or non-standard.
Service config issue: Gateway service PATH includes version managers or package managers; recommend a minimal PATH. (/Users/akkarthikeyan/.nvm/versions/node/v22.22.2/bin)
Recommendation: run "openclaw doctor" (or "openclaw doctor --repair").
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 21529)
Warm-up: launch agents can take a few seconds. Try again shortly.
Connectivity probe: failed
Probe target: ws://127.0.0.1:18789
timeout
Capability: unknown

Port 18789 is already in use.

  • pid 21529 akkarthikeyan: openclaw-gateway (127.0.0.1:18789)
  • Gateway already running locally. Stop it (openclaw gateway stop) or use a different port.
    Listening: 127.0.0.1:18789
    Troubles: run openclaw status
    Troubleshooting: https://docs.openclaw.ai/troubleshooting
    % Total % Received % Xferd Average Speed Time Time Time Current
    Dload Upload Total Spent Left Speed
    0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0* Trying 127.0.0.1:18789...
  • Connected to 127.0.0.1 (127.0.0.1) port 18789

GET / HTTP/1.1
Host: 127.0.0.1:18789
User-Agent: curl/8.7.1
Accept: /

  • Request completely sent off
    0 0 0 0 0 0 0 0 --:--:-- 0:00:04 --:--:-- 0* Operation timed out after 5006 milliseconds with 0 bytes received
    0 0 0 0 0 0 0 0 --:--:-- 0:00:05 --:--:-- 0
  • Closing connection
    curl: (28) Operation timed out after 5006 milliseconds with 0 bytes received
    akkarthikeyan@As-MacBook-Air ~ %
cold tapirBOT
#

This paste is still the same failure state. The important unresolved clue is:

Service PATH still includes .nvm

So the LaunchAgent is still dirty, even though the command now uses /usr/local/bin/node.

Letโ€™s reset only the LaunchAgent metadata โ€” not your ~/.openclaw config/state:

openclaw gateway stop

launchctl bootout gui/$UID/ai.openclaw.gateway 2>/dev/null || true
mv ~/Library/LaunchAgents/ai.openclaw.gateway.plist ~/Library/LaunchAgents/ai.openclaw.gateway.plist.bak-$(date +%Y%m%d-%H%M%S) 2>/dev/null || true

env -i HOME="$HOME" USER="$USER" PATH="/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin" \
  /usr/local/bin/openclaw gateway install --force
#

env -i HOME="$HOME" USER="$USER" PATH="/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin" \
  /usr/local/bin/openclaw gateway restart

sleep 10
openclaw gateway status
curl -v --max-time 5 http://127.0.0.1:18789/ 2>&1 | tail -n 40

After that, check if .nvm is gone from the service:

plutil -p ~/Library/LaunchAgents/ai.openclaw.gateway.plist | grep -E "nvm|PATH|ProgramArguments"

If it still hangs after a clean LaunchAgent, Iโ€™d file a GitHub issue with the sample/logs: https://github.com/openclaw/openclaw/issues

crude arrow
#

โ”‚

Runtime: running (pid 21986)
Warm-up: launch agents can take a few seconds. Try again shortly.
Connectivity probe: failed
Probe target: ws://127.0.0.1:18789
timeout
Capability: unknown

Port 18789 is already in use.

  • pid 21986 akkarthikeyan: openclaw-gateway (127.0.0.1:18789)
  • Gateway already running locally. Stop it (openclaw gateway stop) or use a different port.
    Listening: 127.0.0.1:18789
    Troubles: run openclaw status
    Troubleshooting: https://docs.openclaw.ai/troubleshooting
    % Total % Received % Xferd Average Speed Time Time Time Current
    Dload Upload Total Spent Left Speed
    0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0* Trying 127.0.0.1:18789...
  • Connected to 127.0.0.1 (127.0.0.1) port 18789

GET / HTTP/1.1
Host: 127.0.0.1:18789
User-Agent: curl/8.7.1
Accept: /

  • Request completely sent off
    0 0 0 0 0 0 0 0 --:--:-- 0:00:04 --:--:-- 0* Operation timed out after 5003 milliseconds with 0 bytes received
    0 0 0 0 0 0 0 0 --:--:-- 0:00:05 --:--:-- 0
  • Closing connection
    curl: (28) Operation timed out after 5003 milliseconds with 0 bytes received
    akkarthikeyan@As-MacBook-Air ~ % plutil -p ~/Library/LaunchAgents/ai.openclaw.gateway.plist | grep -E "nvm|PATH|ProgramArguments"
    "PATH" => "/usr/local/bin:/Users/akkarthikeyan/.local/bin:/Users/akkarthikeyan/.npm-global/bin:/Users/akkarthikeyan/bin:/Users/akkarthikeyan/.volta/bin:/Users/akkarthikeyan/.asdf/shims:/Users/akkarthikeyan/.bun/bin:/Users/akkarthikeyan/.nix-profile/bin:/Users/akkarthikeyan/Library/Application Support/fnm/aliases/default/bin:/Users/akkarthikeyan/.fnm/aliases/default/bin:/Users/akkarthikeyan/Library/pnpm:/Users/akkarthikeyan/.local/share/pnpm:/opt/homebrew/bin:/usr/bin:/bin"
    "ProgramArguments" => [
    akkarthikeyan@As-MacBook-Air ~ %
cold tapirBOT
#

Okay, at this point Iโ€™d stop changing config randomly โ€” weโ€™ve isolated it pretty well:

  • Gateway process starts and binds 127.0.0.1:18789
  • TCP connects
  • HTTP/WS never respond
  • CPU spins
  • sample shows Node/libuv file-handle close loop
  • plugins.enabled=false didnโ€™t fix it
  • LaunchAgent now uses /usr/local/bin/node

The remaining question is: LaunchAgent-only bug or gateway runtime bug?

Please test foreground mode:

openclaw gateway stop
#
OPENCLAW_LOG_LEVEL=debug /usr/local/bin/openclaw gateway --port 18789

Leave that running. In a second terminal:

curl -v --max-time 5 http://127.0.0.1:18789/ 2>&1 | tail -n 40
openclaw gateway status

If foreground mode also hangs, please file a GitHub issue with your /tmp/openclaw-gateway-sample.txt and /tmp/openclaw/openclaw-2026-04-28.log: https://github.com/openclaw/openclaw/issues

If foreground works, then itโ€™s specifically launchd/service metadata and we can keep digging there.

crude arrow
#

๐Ÿฆž OpenClaw 2026.4.26 (be8c246) โ€” Ah, the fruit tree company! ๐ŸŽ

โ”‚
โ—‡
Service: LaunchAgent (not loaded)
File logs: /tmp/openclaw/openclaw-2026-04-28.log
Command: /usr/local/bin/node /usr/local/lib/node_modules/openclaw/dist/index.js gateway --port 18789
Service file: ~/Library/LaunchAgents/ai.openclaw.gateway.plist
Working dir: ~/.openclaw
Service env: OPENCLAW_GATEWAY_PORT=18789

Service config looks out of date or non-standard.
Service config issue: Gateway service PATH missing required dirs: /Users/akkarthikeyan/.nvm
Recommendation: run "openclaw doctor" (or "openclaw doctor --repair").
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: unknown (Bad request.
Could not find service "ai.openclaw.gateway" in domain for user gui: 501)
Connectivity probe: failed
Probe target: ws://127.0.0.1:18789
timeout
Capability: unknown

LaunchAgent plist exists but launchd has no loaded job.
LaunchAgent installed but not loaded. Run: openclaw gateway restart
File logs: /tmp/openclaw/openclaw-2026-04-28.log
Port 18789 is already in use.

  • pid 22394 akkarthikeyan: openclaw-gateway (127.0.0.1:18789)
  • Gateway already running locally. Stop it (openclaw gateway stop) or use a different port.
    Listening: 127.0.0.1:18789
    Troubles: run openclaw status
    Troubleshooting: https://docs.openclaw.ai/troubleshooting
    akkarthikeyan@As-MacBook-Air ~ %
cold tapirBOT
#

That confirms it: foreground gateway is also hanging.

Because LaunchAgent is not loaded, but port 18789 is still held by openclaw-gateway pid 22394, this is no longer a launchd-only issue. Itโ€™s the gateway runtime itself wedging.

Next best workaround: try the recommended Node 24 runtime.

# stop the foreground gateway first: Ctrl-C in the terminal running it
# if needed:
kill 22394

brew install node
node -v   # should be v24.x

npm i -g openclaw@latest
#
openclaw gateway install --force
openclaw gateway restart
sleep 10
openclaw gateway status
curl -v --max-time 5 http://127.0.0.1:18789/ 2>&1 | tail -n 40

OpenClaw supports Node 22.14+, but docs recommend Node 24 now: https://docs.openclaw.ai/install/node.

If Node 24 still hangs, please file a GitHub issue: https://github.com/openclaw/openclaw/issues

Include:

  • OpenClaw 2026.4.26
  • Intel MacBook Air, macOS 14.8.5
  • Node version before/after
  • foreground mode also hangs
#
  • curl connects but receives 0 bytes
  • /tmp/openclaw-gateway-sample.txt
  • /tmp/openclaw/openclaw-2026-04-28.log
crude arrow
#

\e PATH includes version managers or package managers; recommend a minimal PATH. (/Users/akkarthikeyan/.nvm/versions/node/v22.22.2/bin)
Service config issue: Gateway service uses Node from a version manager; it can break after upgrades. (/Users/akkarthikeyan/.nvm/versions/node/v22.22.2/bin/node)
Recommendation: run "openclaw doctor" (or "openclaw doctor --repair").
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 23307)
Warm-up: launch agents can take a few seconds. Try again shortly.
Connectivity probe: failed
Probe target: ws://127.0.0.1:18789
timeout
Capability: unknown

Port 18789 is already in use.

  • pid 23307 akkarthikeyan: openclaw-gateway (127.0.0.1:18789)
  • Gateway already running locally. Stop it (openclaw gateway stop) or use a different port.
    Listening: 127.0.0.1:18789
    Troubles: run openclaw status
    Troubleshooting: https://docs.openclaw.ai/troubleshooting
    % Total % Received % Xferd Average Speed Time Time Time Current
    Dload Upload Total Spent Left Speed
    0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0* Trying 127.0.0.1:18789...
  • Connected to 127.0.0.1 (127.0.0.1) port 18789

GET / HTTP/1.1
Host: 127.0.0.1:18789
User-Agent: curl/8.7.1
Accept: /

  • Request completely sent off
    0 0 0 0 0 0 0 0 --:--:-- 0:00:04 --:--:-- 0* Operation timed out after 5006 milliseconds with 0 bytes received
    0 0 0 0 0 0 0 0 --:--:-- 0:00:05 --:--:-- 0
  • Closing connection
    curl: (28) Operation timed out after 5006 milliseconds with 0 bytes received
    akkarthikeyan@As-MacBook-Air ~ %
cold tapirBOT
#

Youโ€™re back on the nvm LaunchAgent path in that latest output, so the clean /usr/local/bin/node setup didnโ€™t stick โ€” or doctor --fix rewrote/restarted the old service again.

Letโ€™s stop using doctor --fix for this. Do one clean isolation test that bypasses LaunchAgent and your normal ~/.openclaw state:

openclaw gateway stop
PID=$(lsof -nP -tiTCP:18789 -sTCP:LISTEN | head -1)
[ -n "$PID" ] && kill "$PID"

TMPDIR=$(mktemp -d /tmp/openclaw-clean.XXXXXX)
cat > "$TMPDIR/openclaw.json" <<'JSON'
{
  gateway: {
    mode: "local",
    bind: "loopback",
    auth: { mode: "none" }
#
  },
  plugins: { enabled: false },
  browser: { enabled: false },
  canvasHost: { enabled: false }
}
JSON

OPENCLAW_CONFIG_PATH="$TMPDIR/openclaw.json" \
OPENCLAW_STATE_DIR="$TMPDIR/state" \
/usr/local/bin/openclaw gateway --port 18790

Leave that running. In a second terminal:

#
curl -v --max-time 5 http://127.0.0.1:18790/ 2>&1 | tail -n 40

Result meaning:

  • If port 18790 responds: your normal ~/.openclaw config/state is triggering the hang.
  • If port 18790 also times out: this is very likely an OpenClaw 2026.4.26 runtime bug on your Intel macOS setup. File it here with the sample/logs: https://github.com/openclaw/openclaw/issues

Please paste only the clean-port 18790 curl result.

crude arrow
#

akkarthikeyan@As-MacBook-Air ~ % curl -v --max-time 5 http://127.0.0.1:18790/ 2>&1 | tail -n 40
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0* Trying 127.0.0.1:18790...

  • connect to 127.0.0.1 port 18790 from 127.0.0.1 port 54628 failed: Connection refused
  • Failed to connect to 127.0.0.1 port 18790 after 0 ms: Couldn't connect to server
    0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
  • Closing connection
    curl: (7) Failed to connect to 127.0.0.1 port 18790 after 0 ms: Couldn't connect to server
    akkarthikeyan@As-MacBook-Air ~ %
cold tapirBOT
#

Connection refused on 18790 means the clean test gateway was not running/listening. Thatโ€™s different from the original 18789 hang.

The curl test only works while this command is still running in another terminal:

OPENCLAW_LOG_LEVEL=debug \
OPENCLAW_CONFIG_PATH="$TMPDIR/openclaw.json" \
OPENCLAW_STATE_DIR="$TMPDIR/state" \
/usr/local/bin/openclaw gateway --port 18790

Please rerun the clean test, but paste the output from the first terminal where the gateway command runs. If it exits immediately, that error is the next clue.

Use this slightly stricter config:

#
TMPDIR=$(mktemp -d /tmp/openclaw-clean.XXXXXX)
cat > "$TMPDIR/openclaw.json" <<'JSON'
{
  "gateway": {
    "mode": "local",
    "bind": "loopback",
    "auth": { "mode": "none" }
  },
  "plugins": { "enabled": false },
  "browser": { "enabled": false },
  "canvasHost": { "enabled": false }
}
JSON

OPENCLAW_LOG_LEVEL=debug \
#
OPENCLAW_CONFIG_PATH="$TMPDIR/openclaw.json" \
OPENCLAW_STATE_DIR="$TMPDIR/state" \
/usr/local/bin/openclaw gateway --port 18790

Then, while itโ€™s still running, in a second terminal:

lsof -nP -iTCP:18790 -sTCP:LISTEN
curl -v --max-time 5 http://127.0.0.1:18790/

Paste the first terminal output. That will tell us whether clean startup crashes before binding or still wedges.

crude arrow
#

/usr/local/bin/openclaw gateway --port 18790

๐Ÿฆž OpenClaw 2026.4.26 (be8c246)
Automation with claws: minimal fuss, maximal pinch.

โ”‚
โ—‡
06:41:50 [gateway] loading configurationโ€ฆ
06:41:51 [gateway] resolving authenticationโ€ฆ
06:41:51 [gateway] auth mode=none explicitly configured; all gateway connections are unauthenticated.
06:41:51 [gateway] starting...
06:41:56 [gateway] starting HTTP server...
06:41:56 [health-monitor] started (interval: 300s, startup-grace: 60s, channel-connect-grace: 120s)
06:41:57 [gateway] agent model: openai/gpt-5.5
06:41:57 [gateway] http server listening (0 plugins, 5.7s)
06:41:57 [gateway] log file: /tmp/openclaw/openclaw-2026-04-29.log
06:41:57 [gateway] starting channels and sidecars...
06:41:57 [gateway] ready
06:41:57 [heartbeat] started

cold tapirBOT
#

Great โ€” clean config on 18790 starts normally. That means the OpenClaw binary/runtime is okay; the hang is coming from your normal ~/.openclaw config/state.

Now narrow it safely:

  1. Stop the clean gateway with Ctrl-C.

  2. Back up normal config:

cp ~/.openclaw/openclaw.json ~/.openclaw/openclaw.json.bak-debug
  1. Try disabling likely startup surfaces in the normal config:
openclaw config set plugins.enabled false
#
openclaw config set browser.enabled false
openclaw config set plugins.entries.browser.enabled false
openclaw config set canvasHost.enabled false
openclaw gateway restart
sleep 10
openclaw gateway status
curl -v --max-time 5 http://127.0.0.1:18789/ 2>&1 | tail -n 40

If it still hangs, the culprit is probably normal state, not config. Then test with normal config but fresh state:

TMPSTATE=$(mktemp -d /tmp/openclaw-state.XXXXXX)
OPENCLAW_STATE_DIR="$TMPSTATE" /usr/local/bin/openclaw gateway --port 18791
#

If fresh state works, the next likely fix is moving aside specific ~/.openclaw state folders rather than reinstalling everything.

crude arrow
#

Service config issue: Gateway service PATH includes version managers or package managers; recommend a minimal PATH. (/Users/akkarthikeyan/.nvm/versions/node/v22.22.2/bin)
Service config issue: Gateway service uses Node from a version manager; it can break after upgrades. (/Users/akkarthikeyan/.nvm/versions/node/v22.22.2/bin/node)
Recommendation: run "openclaw doctor" (or "openclaw doctor --repair").
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 2429)
Warm-up: launch agents can take a few seconds. Try again shortly.
Connectivity probe: failed
Probe target: ws://127.0.0.1:18789
timeout
Capability: unknown

Port 18789 is already in use.

  • pid 2429 akkarthikeyan: openclaw-gateway (127.0.0.1:18789)
  • Gateway already running locally. Stop it (openclaw gateway stop) or use a different port.
    Listening: 127.0.0.1:18789
    Troubles: run openclaw status
    Troubleshooting: https://docs.openclaw.ai/troubleshooting
    % Total % Received % Xferd Average Speed Time Time Time Current
    Dload Upload Total Spent Left Speed
    0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0* Trying 127.0.0.1:18789...
  • Connected to 127.0.0.1 (127.0.0.1) port 18789

GET / HTTP/1.1
Host: 127.0.0.1:18789
User-Agent: curl/8.7.1
Accept: /

  • Request completely sent off
    0 0 0 0 0 0 0 0 --:--:-- 0:00:04 --:--:-- 0* Operation timed out after 5001 milliseconds with 0 bytes received
    0 0 0 0 0 0 0 0 --:--:-- 0:00:05 --:--:-- 0
  • Closing connection
    curl: (28) Operation timed out after 5001 milliseconds with 0 bytes received
    akkarthikeyan@As-MacBook-Air ~ %
cold tapirBOT
#

Weโ€™re back to the same 18789 state, but the important finding is already clear:

  • Clean config/state on 18790 works
  • Normal ~/.openclaw on 18789 hangs

So this is almost certainly something in your existing ~/.openclaw config/state.

Fastest recovery path: move state aside, keep a backup, let OpenClaw recreate clean state:

openclaw gateway stop
PID=$(lsof -nP -tiTCP:18789 -sTCP:LISTEN | head -1)
[ -n "$PID" ] && kill "$PID"

mv ~/.openclaw ~/.openclaw.broken-$(date +%Y%m%d-%H%M%S)
#
curl -fsSL https://openclaw.ai/install.sh | bash -s -- --install-method npm --no-onboard
openclaw onboard
openclaw gateway install --force
openclaw gateway restart
openclaw gateway status

Your old files will be in ~/.openclaw.broken-*, so you can copy back only what you need later.

If you want a less drastic narrowing step before full reset, try moving only sessions/state first:

openclaw gateway stop
PID=$(lsof -nP -tiTCP:18789 -sTCP:LISTEN | head -1)
[ -n "$PID" ] && kill "$PID"
#

mkdir -p ~/.openclaw-debug-backup
mv ~/.openclaw/sessions ~/.openclaw-debug-backup/sessions-$(date +%Y%m%d-%H%M%S) 2>/dev/null || true
mv ~/.openclaw/state ~/.openclaw-debug-backup/state-$(date +%Y%m%d-%H%M%S) 2>/dev/null || true

openclaw gateway restart
sleep 10
openclaw gateway status

Given how long this has gone, Iโ€™d do the full reset and keep the broken folder for a GitHub issue if maintainers want to inspect it.

crude arrow
#

Ok how GitHub isssues what to mention?

cold tapirBOT
#

File it here: https://github.com/openclaw/openclaw/issues

Title:

Gateway binds port but hangs / never responds on Intel macOS with existing ~/.openclaw state

Body you can paste:

## Summary

OpenClaw gateway starts, binds `127.0.0.1:18789`, and logs `gateway ready`, but HTTP/WS never respond. `curl` connects then times out with 0 bytes received. CPU stays high.

A clean temporary config/state on port `18790` works, so this seems related to my existing `~/.openclaw` config/state.
#

## Environment

- OpenClaw: `2026.4.26 (be8c246)`
- OS: macOS 14.8.5
- Machine: Intel MacBook Air
- Node: initially nvm Node `v22.22.2`; also tried `/usr/local/bin/node`
- Install path seen in service: `/usr/local/lib/node_modules/openclaw/dist/index.js`

## Symptoms

`openclaw gateway status` shows:

```text
Runtime: running
Connectivity probe: failed
#

Probe target: ws://127.0.0.1:18789
timeout
Listening: 127.0.0.1:18789


`curl`:

```text
Connected to 127.0.0.1 port 18789
GET / HTTP/1.1
Operation timed out after 5000 ms with 0 bytes received

Things tried

  • openclaw doctor --fix
#
- `openclaw gateway restart`
- rewrote LaunchAgent / switched from nvm Node to `/usr/local/bin/node`
- `plugins.enabled=false`
- `browser.enabled=false`
- `plugins.entries.browser.enabled=false`
- `canvasHost.enabled=false`

Still hangs on normal `~/.openclaw`.

## Important finding

Clean isolated config/state works:

```bash
TMPDIR=$(mktemp -d /tmp/openclaw-clean.XXXXXX)
# minimal config with gateway auth none, plugins/browser/canvas disabled
#

OPENCLAW_CONFIG_PATH="$TMPDIR/openclaw.json"
OPENCLAW_STATE_DIR="$TMPDIR/state"
/usr/local/bin/openclaw gateway --port 18790


This logs:

```text
http server listening (0 plugins, 5.7s)
gateway ready

Sample

macOS /usr/bin/sample showed the stuck process mostly in Node/libuv file close callbacks, e.g.:

#

node::SpinEventLoopInternal
uv_run
uv__io_poll
uv__async_io
uv__work_done
node::fs::FileHandle::ClosePromise
node::fs::FileHandle::CloseReq::Resolve


I can attach:
- `/tmp/openclaw-gateway-sample.txt`
- `/tmp/openclaw/openclaw-2026-04-28.log`
- current `~/.openclaw/openclaw.json` with secrets redacted

Also attach those files if youโ€™re comfortable, but redact tokens/API keys first.

crude arrow
#

issue filed. Why is this happening?

cold tapirBOT
#

Thanks for filing it โ€” that was the right move.

Best explanation from the evidence: something in your existing ~/.openclaw state/config is triggering a gateway startup busy-loop. The gateway binds the port early, then gets stuck in Nodeโ€™s event loop before it can actually answer HTTP/WS requests.

Thatโ€™s why you see the confusing combo:

  • Port 18789 is already in use โ†’ the gateway process did bind the port
  • Connectivity probe: failed timeout โ†’ but the HTTP/WS handler never responds
  • curl connects, then gets 0 bytes โ†’ socket accepted, app logic stuck
  • clean OPENCLAW_STATE_DIR + clean config on 18790 works โ†’ binary/runtime is probably fine
  • sample showed Node/libuv file-handle close callbacks โ†’ likely a state/file-processing loop, not networking

So itโ€™s probably not a port issue, not a firewall issue, and not just LaunchAgent anymore.

Practical workaround: move the broken state aside and start clean:

#
openclaw gateway stop
mv ~/.openclaw ~/.openclaw.broken-$(date +%Y%m%d-%H%M%S)
openclaw onboard
openclaw gateway install --force
openclaw gateway restart

Keep the broken folder in case maintainers ask for a specific file. Donโ€™t share it publicly without redacting secrets.

crude arrow
#

Already Installation in progress. But why suddenly breaking , anything we can do to prevent it in future. How relaible is OpenClaw?

cold tapirBOT
#

Totally fair question. I donโ€™t want to sugarcoat it: this kind of failure is frustrating.

Why it suddenly broke: from what we found, the OpenClaw install itself can start clean, but your existing ~/.openclaw state/config makes the gateway hang during startup. That can happen after a combination of things like:

  • version downgrade/upgrade/reinstall
  • doctor --fix migrations
  • stale session/state files
  • plugin/runtime state
  • LaunchAgent + nvm/global Node path mismatch

The gateway bound the port, but got stuck before serving HTTP/WS โ€” thatโ€™s why it looked โ€œrunningโ€ but unusable.

How to reduce this in the future:

cp -a ~/.openclaw ~/.openclaw.backup-$(date +%Y%m%d-%H%M%S)
#

Do that before major updates/downgrades. Also:

  • prefer openclaw update over manual downgrade/reinstall loops
  • use a stable system/Homebrew Node, ideally Node 24
  • avoid mixing nvm Node with /usr/local global installs for the LaunchAgent
  • if something breaks, run openclaw status --all before repeated doctor --fix
  • donโ€™t copy old ~/.openclaw wholesale into a fresh install; bring config/state back gradually

How reliable is OpenClaw?
Itโ€™s powerful and very actively developed, but itโ€™s still a fast-moving local-first assistant stack โ€” not a boring, enterprise-hardened daemon yet. For many people it runs well, but edge cases around local state, plugins, Node versions, and migrations can happen. Your issue is exactly the kind of bug maintainers need filed so startup can become more resilient.

Docs: https://docs.openclaw.ai/help/faq https://docs.openclaw.ai/install/node

crude arrow
#

ok now want if i want to clean completely and wanted to install llike first time, like completky deleting and installing from 0, can this issue avoided. Becuases this is 3rd i am installing in last 2 days?

cold tapirBOT
#

Yes โ€” a real clean install should avoid this specific issue, because we proved clean config/state works. The reason your previous reinstalls didnโ€™t help is likely because they kept reusing the same broken ~/.openclaw state.

Iโ€™d do a safe wipe first โ€” move old state aside instead of deleting:

openclaw gateway stop
launchctl bootout gui/$UID/ai.openclaw.gateway 2>/dev/null || true

PID=$(lsof -nP -tiTCP:18789 -sTCP:LISTEN | head -1)
[ -n "$PID" ] && kill "$PID"

mv ~/.openclaw ~/.openclaw.broken-$(date +%Y%m%d-%H%M%S) 2>/dev/null || true
mv ~/Library/LaunchAgents/ai.openclaw.gateway.plist ~/Library/LaunchAgents/ai.openclaw.gateway.plist.bak-$(date +%Y%m%d-%H%M%S) 2>/dev/null || true

Then reinstall fresh:

#
curl -fsSL https://openclaw.ai/install.sh | bash -s -- --install-method npm --no-onboard
openclaw onboard
openclaw gateway install --force
openclaw gateway restart
openclaw gateway status

If you want truly delete from zero, use the official uninstall path first:

openclaw uninstall --all --yes --non-interactive

But I prefer the mv ~/.openclaw ... backup approach until everything works, because it preserves old logs/config in case maintainers need them.

Also: use stable system/Homebrew Node if possible, not nvm for the LaunchAgent. Reinstalls wonโ€™t help if the old state folder keeps coming back.

crude arrow
#

โ”‚http://127.0.0.1:18789/#token=dccbd4da549b6de4ef5ffd32f0d1698505ea11e9cc62 โ”‚
โ”‚ 658f โ”‚
โ”‚ Gateway WS: ws://127.0.0.1:18789 โ”‚
โ”‚ Gateway: not detected (connect ECONNREFUSED 127.0.0.1:18789) โ”‚
โ”‚ Docs: https://docs.openclaw.ai/web/control-ui โ”‚
โ”‚ โ”‚
โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฏ
โ”‚
โ—‡ Start TUI (best option!) โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฎ
โ”‚ โ”‚
โ”‚ This is the defining action that makes your agent you. โ”‚
โ”‚ Please take your time. โ”‚
โ”‚ The more you tell it, the better the experience will be. โ”‚
โ”‚ We will send: "Wake up, my friend!" โ”‚
โ”‚ โ”‚
โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฏ
โ”‚
โ—‡ How do you want to hatch your bot?
โ”‚ Hatch in Terminal (recommended)

๐Ÿฆž OpenClaw 2026.4.26 (be8c246) โ€” You had me at 'openclaw gateway start.'

openclaw tui - local embedded - agent main - session main

session agent:main:main

Wake up, my friend!

hi
whhow are you

cold tapirBOT
#

Nice โ€” that means the fresh install/onboard path is alive enough for the TUI. ๐ŸŽ‰

Two important things:

  1. The dashboard line says:
Gateway: not detected (connect ECONNREFUSED 127.0.0.1:18789)

So the LaunchAgent gateway still isnโ€™t running yet. TUI can run embedded/local, so it may work even when the daemon is down.

  1. Donโ€™t paste that #token=... publicly โ€” rotate it after setup:
openclaw config set gateway.auth.token "$(openssl rand -hex 32)"
#

Then start the gateway service:

openclaw gateway install --force
openclaw gateway restart
sleep 10
openclaw gateway status

If status says Connectivity probe: ok, youโ€™re good. If not, paste only the gateway status output โ€” but redact any token URLs.

crude arrow
#

this from GithuB What I checked:

Related reports do not supersede this issue: The related ClawSweeper records cover different failure modes: Gateway hangs on startup after plugin system refactor (never binds port) #50744 was a never-binds startup hang, Gateway startup hangs when previous process exists as zombie (PID alive but port not listening) #57115 was stale/zombie PID with port not listening, and openclaw node run hangs silently on macOS after printing PATH, never connects to gateway #46147 was a node-client/gateway handshake timeout. This report is post-bind, post-gateway ready, and tied to existing local state, so none is a clear duplicate or implemented proof. (7e5c3753f6f7)
Likely related people:

Peter Steinberger steipete@gmail.com: Available current-main blame for the central gateway startup, HTTP probe, and gateway CLI run paths points to commit 955b4df by Peter; local shortlog over src/gateway, src/cli/gateway-cli, src/cli/daemon-cli, and src/infra/gateway-lock.ts also routes the available history to Peter. Confidence is medium because the available history is compact and this is routing context, not fault assignment. (role: recent maintainer of gateway startup/runtime paths; confidence: medium; commits: 955b4df0939f, 212a3264, b04c9380; files: src/gateway/server.impl.ts, src/gateway/server-http.ts, src/cli/gateway-cli/run.ts)
Remaining risk / open question:

No logs, diagnostics export, sanitized config, or failing state subset were attached, so the exact state file or startup loop is not isolated yet.
A live Intel macOS reproduction was not feasible in this read-only review without the reporter's existing ~/.openclaw state.
Because the reporter says disabling plugins/browser/canvas did not help, a fix may need to inspect startup scheduled services, state migrations, delivery/session recovery, or event-loop health rather than assuming a plugin-only root cause

cold tapirBOT
#

That GitHub response is basically: โ€œnot a known duplicate; we need artifacts from the broken state.โ€

Iโ€™d reply with this:

Thanks. I have now done a fresh reset and the clean install/onboard path works.

I still have the old broken `~/.openclaw.broken-*` folder saved. The key finding was:

- normal old `~/.openclaw` on `18789` hangs after bind
- clean temp config/state on `18790` starts and reaches `gateway ready`
- disabling plugins/browser/canvas did not fix the old state
- macOS sample showed Node/libuv file-handle close loop

I can provide a diagnostics zip / sanitized config if helpful. I will not upload the full broken state publicly because it may contain secrets.
#

If you still have the broken logs/sample, attach:

  • /tmp/openclaw-gateway-sample.txt
  • /tmp/openclaw/openclaw-2026-04-28.log
  • sanitized old openclaw.json if comfortable

You can also run:

openclaw gateway diagnostics export --output ~/Desktop/openclaw-diagnostics.zip

Review before uploading. Docs say itโ€™s designed to redact secrets, but still treat it carefully: https://docs.openclaw.ai/gateway/diagnostics

And donโ€™t email/tag anyone directly โ€” the issue is enough.

crude arrow
#

๐Ÿฆž OpenClaw 2026.4.26 (be8c246)
Claws out, commit inโ€”let's ship something mildly responsible.

โ”‚
โ—‡
Service: LaunchAgent (loaded)
File logs: /tmp/openclaw/openclaw-2026-04-29.log
Command: /Users/akkarthikeyan/.nvm/versions/node/v22.22.2/bin/node /Users/akkarthikeyan/.nvm/versions/node/v22.22.2/lib/node_modules/openclaw/dist/index.js gateway --port 18789
Service file: ~/Library/LaunchAgents/ai.openclaw.gateway.plist
Working dir: ~/.openclaw
Service env: OPENCLAW_GATEWAY_PORT=18789

Service config looks out of date or non-standard.
Service config issue: Gateway service PATH includes version managers or package managers; recommend a minimal PATH. (/Users/akkarthikeyan/.nvm/versions/node/v22.22.2/bin)
Service config issue: Gateway service uses Node from a version manager; it can break after upgrades. (/Users/akkarthikeyan/.nvm/versions/node/v22.22.2/bin/node)
Recommendation: run "openclaw doctor" (or "openclaw doctor --repair").
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 5235)
Warm-up: launch agents can take a few seconds. Try again shortly.
Connectivity probe: failed
Probe target: ws://127.0.0.1:18789
connect ECONNREFUSED 127.0.0.1:18789
Capability: unknown

Gateway port 18789 is not listening (service appears running).
Last gateway error: (Use node --trace-deprecation ... to show where the warning was created)
Logs: ~/.openclaw/logs/gateway.log
Errors: ~/.openclaw/logs/gateway.err.log
Restart log: ~/.openclaw/logs/gateway-restart.log

Troubles: run openclaw status
Troubleshooting: https://docs.openclaw.ai/troubleshooting
akkarthikeyan@As-MacBook-Air ~ %

cold tapirBOT
#

Now the failure changed: itโ€™s not listening at all (ECONNREFUSED), and the service is back to the nvm install path:

~/.nvm/.../bin/node ~/.nvm/.../lib/node_modules/openclaw/...

So this is likely a broken/stale LaunchAgent again, not the previous post-bind hang.

Run this:

tail -n 120 ~/.openclaw/logs/gateway.err.log
tail -n 120 ~/.openclaw/logs/gateway.log
tail -n 120 ~/.openclaw/logs/gateway-restart.log

And if you want to force the service away from nvm:

#
openclaw gateway stop
launchctl bootout gui/$UID/ai.openclaw.gateway 2>/dev/null || true
rm -f ~/Library/LaunchAgents/ai.openclaw.gateway.plist

env -i HOME="$HOME" USER="$USER" PATH="/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin" \
  /usr/local/bin/openclaw gateway install --force

env -i HOME="$HOME" USER="$USER" PATH="/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin" \
  /usr/local/bin/openclaw gateway restart

sleep 10
openclaw gateway status

If openclaw in your shell still points to nvm, check:

#
which -a openclaw

Use /usr/local/bin/openclaw explicitly for the install/restart if you want the LaunchAgent to use that one.

crude arrow
#

akkarthikeyan@As-MacBook-Air ~ % which -a openclaw
/Users/akkarthikeyan/.nvm/versions/node/v22.22.2/bin/openclaw
/usr/local/bin/openclaw

cold tapirBOT
#

Yep โ€” that explains why it keeps coming back. Your shell is picking the nvm OpenClaw first:

~/.nvm/.../bin/openclaw
/usr/local/bin/openclaw

So when you run plain openclaw ..., it rewrites/restarts the service using the nvm install again.

Use /usr/local/bin/openclaw explicitly:

/Users/akkarthikeyan/.nvm/versions/node/v22.22.2/bin/npm rm -g openclaw

/usr/local/bin/openclaw gateway stop
launchctl bootout gui/$UID/ai.openclaw.gateway 2>/dev/null || true
#
rm -f ~/Library/LaunchAgents/ai.openclaw.gateway.plist

env -i HOME="$HOME" USER="$USER" PATH="/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin" \
  /usr/local/bin/openclaw gateway install --force

env -i HOME="$HOME" USER="$USER" PATH="/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin" \
  /usr/local/bin/openclaw gateway restart

sleep 10
/usr/local/bin/openclaw gateway status

Then open a new terminal and check:

#
which -a openclaw

Ideally nvmโ€™s openclaw is gone, or /usr/local/bin comes first in PATH.

crude arrow
#

Restarted LaunchAgent: gui/501/ai.openclaw.gateway
Timed out after 60s waiting for gateway port 18789 to become healthy.
Gateway process is running but port 18789 is still free (startup hang/crash loop or very slow VM startup).
Service runtime: status=running, state=running, pid=6458
Gateway port 18789 status: free.
Gateway restart timed out after 60s waiting for health checks.
Tip: openclaw gateway status --deep
Tip: openclaw doctor

๐Ÿฆž OpenClaw 2026.4.26 (be8c246)
Self-hosted, self-updating, self-aware (just kidding... unless?).

โ”‚
โ—‡
Service: LaunchAgent (loaded)
File logs: /tmp/openclaw/openclaw-2026-04-29.log
Command: /usr/local/bin/node /usr/local/lib/node_modules/openclaw/dist/index.js gateway --port 18789
Service file: ~/Library/LaunchAgents/ai.openclaw.gateway.plist
Working dir: ~/.openclaw
Service env: OPENCLAW_GATEWAY_PORT=18789

Service config looks out of date or non-standard.
Service config issue: Gateway service PATH missing required dirs: /Users/akkarthikeyan/.nvm
Recommendation: run "openclaw doctor" (or "openclaw doctor --repair").
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 6458)
Warm-up: launch agents can take a few seconds. Try again shortly.
Connectivity probe: failed
Probe target: ws://127.0.0.1:18789
connect ECONNREFUSED 127.0.0.1:18789
Capability: unknown

Gateway port 18789 is not listening (service appears running).
Last gateway error: Node.js v22.22.2
Logs: ~/.openclaw/logs/gateway.log
Errors: ~/.openclaw/logs/gateway.err.log
Restart log: ~/.openclaw/logs/gateway-restart.log

Troubles: run openclaw status
Troubleshooting: https://docs.openclaw.ai/troubleshooting
akkarthikeyan@As-MacBook-Air ~ % which -a openclaw
/usr/local/bin/openclaw
akkarthikeyan@As-MacBook-Air ~ %

cold tapirBOT
#

Good, the nvm openclaw is gone now. The remaining issue is startup failing before it even binds.

This line is the next clue:

Last gateway error: Node.js v22.22.2

That usually means the real error is in gateway.err.log just above/below the Node version banner. Please paste:

tail -n 200 ~/.openclaw/logs/gateway.err.log
tail -n 120 ~/.openclaw/logs/gateway.log
tail -n 120 ~/.openclaw/logs/gateway-restart.log

Also check what /usr/local/bin/node actually is:

#
/usr/local/bin/node -v
/usr/local/bin/node -p "process.execPath"

The โ€œPATH missing required dirs: ~/.nvmโ€ warning is probably just because your config/env still references nvm somewhere, but the service command itself is now clean:

/usr/local/bin/node /usr/local/lib/node_modules/openclaw/...

So logs are the thing now.

crude arrow
#

akkarthikeyan@As-MacBook-Air ~ % tail -n 200 ~/.openclaw/logs/gateway.err.log
tail -n 120 ~/.openclaw/logs/gateway.log
tail -n 120 ~/.openclaw/logs/gateway-restart.log
2026-04-29T07:10:21.158+05:30 Config overwrite: /Users/akkarthikeyan/.openclaw/openclaw.json (sha256 c4fbf459ca6ab930003ef1df301120ce99232b5d8aa1dcbb904d048151b836ce -> bc543409d4d0bcd0a83e2d6378680109ad50901aef823036c38f582a805dcb5a, backup=/Users/akkarthikeyan/.openclaw/openclaw.json.bak)
2026-04-29T07:11:50.115+05:30 (node:3793) [DEP0040] DeprecationWarning: The punycode module is deprecated. Please use a userland alternative instead.
(Use node --trace-deprecation ... to show where the warning was created)
2026-04-29T07:12:02.046+05:30 [plugins] bonjour: watchdog detected non-announced service; attempting re-advertise (gateway fqdn=Aโ€™s MacBook Air (OpenClaw)._openclaw-gw._tcp.local. host=As-MacBook-Air.local. port=18789 state=unannounced)
2026-04-29T07:12:03.166+05:30 [gateway] security warning: dangerous config flags enabled: gateway.controlUi.allowInsecureAuth=true. Run openclaw security audit.
2026-04-29T07:15:48.600+05:30 [plugins] bonjour: restarting advertiser (service stuck in announcing for 226558ms (gateway fqdn=Aโ€™s MacBook Air (OpenClaw)._openclaw-gw._tcp.local. host=As-MacBook-Air.local. port=18789 state=announcing))
2026-04-29T07:15:54.171+05:30 [plugins] bonjour: watchdog detected non-announced service; attempting re-advertise (gateway fqdn=Aโ€™s MacBook Air (OpenClaw)._openclaw-gw._tcp.local. host=As-MacBook-Air.local. port=18789 state=unannounced)
2026-04-29T07:16:02.451+05:30 [plugins] bonjour: restarting advertiser (service stuck in unannounced for 8191ms (gateway fqdn=Aโ€™s MacBook Air (OpenClaw)._openclaw-gw._tcp.local. host=As-MacBook-Air.local. port=18789 state=unannounced))
2026-04-29T07:22:09.811+05:30 (node:5235) [DEP0040]
w

cold tapirBOT
#

Good clue: the log is showing Bonjour/mDNS getting stuck/restarting:

[plugins] bonjour: watchdog detected non-announced service
[plugins] bonjour: restarting advertiser

That may not be the whole bug, but itโ€™s suspicious enough to disable for now. Bonjour only affects LAN auto-discovery; itโ€™s safe to turn off.

Run:

/usr/local/bin/openclaw plugins disable bonjour
/usr/local/bin/openclaw gateway restart
sleep 10
/usr/local/bin/openclaw gateway status
#

If it still doesnโ€™t listen, paste these separately with labels:

echo "=== ERR ==="
tail -n 200 ~/.openclaw/logs/gateway.err.log

echo "=== LOG ==="
tail -n 200 ~/.openclaw/logs/gateway.log

echo "=== RESTART ==="
tail -n 200 ~/.openclaw/logs/gateway-restart.log

Also this warning is worth cleaning up later:

crude arrow
#

2026-04-29T07:25:56.294+05:30 [gmail-watcher] gmail watcher stopped
2026-04-29T07:26:58.792+05:30 [gateway] loading configurationโ€ฆ
2026-04-29T07:27:01.040+05:30 [gateway] resolving authenticationโ€ฆ
2026-04-29T07:27:01.044+05:30 [gateway] starting...
2026-04-29T07:27:11.339+05:30 [gateway] [plugins] staging bundled runtime deps before gateway startup (10 missing, 14 install specs): @grammyjs/runner@^2.0.3, @grammyjs/transformer-throttler@^1.2.1, @homebridge/ciao@^1.3.6, @modelcontextprotocol/sdk@1.29.0, chokidar@^5.0.0, express@5.2.1, grammy@^1.42.0, playwright-core@1.59.1, typebox@1.1.33, undici@8.1.0
2026-04-29T07:27:55.391+05:30 [gateway] [plugins] installed bundled runtime deps before gateway startup in 44051ms: @grammyjs/runner@^2.0.3, @grammyjs/transformer-throttler@^1.2.1, @homebridge/ciao@^1.3.6, @modelcontextprotocol/sdk@1.29.0, chokidar@^5.0.0, express@5.2.1, grammy@^1.42.0, playwright-core@1.59.1, typebox@1.1.33, undici@8.1.0
2026-04-29T07:28:45.936+05:30 [gateway] starting HTTP server...
2026-04-29T07:28:45.951+05:30 [canvas] host mounted at http://127.0.0.1:18789/__openclaw__/canvas/ (root /Users/akkarthikeyan/.openclaw/canvas)
2026-04-29T07:28:50.480+05:30 [health-monitor] started (interval: 300s, startup-grace: 60s, channel-connect-grace: 120s)
2026-04-29T07:28:51.553+05:30 [gateway] agent model: google/gemini-3.1-pro-preview
2026-04-29T07:28:51.582+05:30 [gateway] http server listening (8 plugins: acpx, bonjour, browser, device-pair, memory-core, phone-control, talk-voice, telegram; 110.5s)
2026-04-29T07:28:51.586+05:30 [gateway] log file: /tmp/openclaw/openclaw-2026-04-29.log
2026-04-29T07:28:52.797+05:30 [gateway] starting channels and sidecars...
2026-04-29T07:28:57.051+05:30 [hooks] loaded 4 internal hook handlers
tail: /Users/akkarthikeyan/.openclaw/logs/gateway-restart.log: No such file or directory
akkarthikeyan@As-MacBook-Air ~ % /usr/local/bin/node -v
/usr/local/bin/node -p "process.execPath"
v24.13.1
/usr/local/bin/node

cold tapirBOT
#

This is actually much better. Node is now clean:

v24.13.1
/usr/local/bin/node

And the gateway did bind:

http server listening ... 110.5s

The earlier restart timed out after 60s because startup took 110.5 seconds, mostly:

  • installing bundled plugin deps: 44s
  • then another long delay before HTTP server startup
#

So it may not be broken now โ€” just very slow on first fresh startup.

Run this now:

/usr/local/bin/openclaw gateway status
curl -v --max-time 5 http://127.0.0.1:18789/ 2>&1 | tail -n 40

If it responds now, youโ€™re okay. Future starts should be faster because the runtime deps are already installed.

If it still times out after http server listening, then the hang is after sidecars/hooks, and Iโ€™d temporarily disable Bonjour + maybe Gmail watcher next. But first check status now.

crude arrow
#

Service file: ~/Library/LaunchAgents/ai.openclaw.gateway.plist
Working dir: ~/.openclaw
Service env: OPENCLAW_GATEWAY_PORT=18789

Service config looks out of date or non-standard.
Service config issue: Gateway service PATH missing required dirs: /Users/akkarthikeyan/.nvm
Recommendation: run "openclaw doctor" (or "openclaw doctor --repair").
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 6458)
Warm-up: launch agents can take a few seconds. Try again shortly.
Connectivity probe: failed
Probe target: ws://127.0.0.1:18789
timeout
Capability: unknown

Port 18789 is already in use.

  • pid 6458 akkarthikeyan: openclaw-gateway (127.0.0.1:18789)
  • Gateway already running locally. Stop it (openclaw gateway stop) or use a different port.
    Listening: 127.0.0.1:18789
    Troubles: run openclaw status
    Troubleshooting: https://docs.openclaw.ai/troubleshooting
    % Total % Received % Xferd Average Speed Time Time Time Current
    Dload Upload Total Spent Left Speed
    0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0* Trying 127.0.0.1:18789...
  • Connected to 127.0.0.1 (127.0.0.1) port 18789

GET / HTTP/1.1
Host: 127.0.0.1:18789
User-Agent: curl/8.7.1
Accept: /

  • Request completely sent off
    0 0 0 0 0 0 0 0 --:--:-- 0:00:04 --:--:-- 0* Operation timed out after 5002 milliseconds with 0 bytes received
    0 0 0 0 0 0 0 0 --:--:-- 0:00:05 --:--:-- 0
  • Closing connection
    curl: (28) Operation timed out after 5002 milliseconds with 0 bytes received
    akkarthikeyan@As-MacBook-Air ~ %
cold tapirBOT
#

Now weโ€™re back to the post-bind hang:

  • port is listening
  • curl connects
  • no response
  • logs show http server listening
  • then it hangs around sidecars/hooks

The suspicious log lines are Bonjour and Gmail watcher. Try disabling those temporarily:

/usr/local/bin/openclaw plugins disable bonjour
/usr/local/bin/openclaw config set hooks.enabled false
/usr/local/bin/openclaw config set browser.enabled false
/usr/local/bin/openclaw config set plugins.entries.browser.enabled false
#
/usr/local/bin/openclaw gateway restart
sleep 20
/usr/local/bin/openclaw gateway status
curl -v --max-time 5 http://127.0.0.1:18789/ 2>&1 | tail -n 40

If that works, re-enable things one by one later.

Also: donโ€™t run doctor --fix right now โ€” it keeps changing variables while weโ€™re trying to isolate the sidecar causing the hang.

The PATH missing ~/.nvm warning is less important now; the service command is using clean Node 24:

/usr/local/bin/node
#

So focus on the sidecars/plugins/hooks.

crude arrow
#

/usr/local/lib/node_modules/openclaw/dist/index.js gateway --port 18789
Service file: ~/Library/LaunchAgents/ai.openclaw.gateway.plist
Working dir: ~/.openclaw
Service env: OPENCLAW_GATEWAY_PORT=18789

Service config looks out of date or non-standard.
Service config issue: Gateway service PATH missing required dirs: /Users/akkarthikeyan/.nvm
Recommendation: run "openclaw doctor" (or "openclaw doctor --repair").
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 8048)
Warm-up: launch agents can take a few seconds. Try again shortly.
Connectivity probe: failed
Probe target: ws://127.0.0.1:18789
timeout
Capability: unknown

Port 18789 is already in use.

  • pid 8048 akkarthikeyan: openclaw-gateway (127.0.0.1:18789)
  • Gateway already running locally. Stop it (openclaw gateway stop) or use a different port.
    Listening: 127.0.0.1:18789
    Troubles: run openclaw status
    Troubleshooting: https://docs.openclaw.ai/troubleshooting
    % Total % Received % Xferd Average Speed Time Time Time Current
    Dload Upload Total Spent Left Speed
    0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0* Trying 127.0.0.1:18789...
  • Connected to 127.0.0.1 (127.0.0.1) port 18789

GET / HTTP/1.1
Host: 127.0.0.1:18789
User-Agent: curl/8.7.1
Accept: /

  • Request completely sent off
    0 0 0 0 0 0 0 0 --:--:-- 0:00:04 --:--:-- 0* Operation timed out after 5006 milliseconds with 0 bytes received
    0 0 0 0 0 0 0 0 --:--:-- 0:00:05 --:--:-- 0
  • Closing connection
    curl: (28) Operation timed out after 5006 milliseconds with 0 bytes received
    akkarthikeyan@As-MacBook-Air ~ %
cold tapirBOT
#

This paste still only shows the same status + curl result โ€” I canโ€™t tell whether the disable commands actually applied.

Run this exact block and paste all output:

/usr/local/bin/openclaw plugins disable bonjour
/usr/local/bin/openclaw config set hooks.enabled false
/usr/local/bin/openclaw config set browser.enabled false
/usr/local/bin/openclaw config set plugins.entries.browser.enabled false

echo "=== config check ==="
/usr/local/bin/openclaw config get plugins.entries.bonjour.enabled
/usr/local/bin/openclaw config get hooks.enabled
/usr/local/bin/openclaw config get browser.enabled
/usr/local/bin/openclaw config get plugins.entries.browser.enabled
#
echo "=== restart ==="
/usr/local/bin/openclaw gateway restart
sleep 30

echo "=== status ==="
/usr/local/bin/openclaw gateway status

echo "=== curl ==="
curl -v --max-time 5 http://127.0.0.1:18789/ 2>&1 | tail -n 40

If it still hangs, immediately paste:

echo "=== latest log ==="
#
tail -n 250 ~/.openclaw/logs/gateway.log

echo "=== latest err ==="
tail -n 250 ~/.openclaw/logs/gateway.err.log

We need the config check because right now the gateway is still loading bonjour/sidecars, so Iโ€™m not convinced the disabling step stuck.

crude arrow
#

i am done. How to complete uninstall and start fresh install without out things

cold tapirBOT
#

Yeah, fair. Letโ€™s stop debugging and do a clean reset.

This will remove OpenClaw state/config. I recommend moving it aside first instead of deleting, so you can recover tokens/logs if needed.

# 1) Stop gateway + remove LaunchAgent
/usr/local/bin/openclaw gateway stop 2>/dev/null || true
launchctl bootout gui/$UID/ai.openclaw.gateway 2>/dev/null || true
rm -f ~/Library/LaunchAgents/ai.openclaw.gateway.plist

# 2) Kill any stuck gateway process
PID=$(lsof -nP -tiTCP:18789 -sTCP:LISTEN | head -1)
[ -n "$PID" ] && kill "$PID"

# 3) Move old state/config aside
mv ~/.openclaw ~/.openclaw.broken-$(date +%Y%m%d-%H%M%S) 2>/dev/null || true
#

# 4) Remove duplicate installs
/Users/akkarthikeyan/.nvm/versions/node/v22.22.2/bin/npm rm -g openclaw 2>/dev/null || true
/usr/local/bin/npm rm -g openclaw 2>/dev/null || true

# 5) Fresh install using system/Homebrew Node
curl -fsSL https://openclaw.ai/install.sh | bash -s -- --install-method npm --no-onboard

# 6) Start from zero
/usr/local/bin/openclaw onboard
/usr/local/bin/openclaw gateway install --force
/usr/local/bin/openclaw gateway restart
sleep 20
/usr/local/bin/openclaw gateway status
crude arrow
#

i needed compete wipe off and installation

cold tapirBOT
#

Got it. Complete wipe means losing OpenClaw config, auth, sessions, logs, workspace, and old backups.

Run this:

# Stop/remove service
openclaw gateway stop 2>/dev/null || true
launchctl bootout gui/$UID/ai.openclaw.gateway 2>/dev/null || true
rm -f ~/Library/LaunchAgents/ai.openclaw.gateway.plist

# Kill stuck gateway
pkill -f openclaw-gateway 2>/dev/null || true
pkill -f "openclaw.*gateway" 2>/dev/null || true

# Remove all OpenClaw state/config/backups
rm -rf ~/.openclaw ~/.openclaw-* ~/.openclaw.broken-*
#

# Remove global installs from both places
/usr/local/bin/npm rm -g openclaw 2>/dev/null || true
~/.nvm/versions/node/v22.22.2/bin/npm rm -g openclaw 2>/dev/null || true

# Clear shell command cache
hash -r 2>/dev/null || true

Then fresh install:

curl -fsSL https://openclaw.ai/install.sh | bash -s -- --install-method npm --no-onboard

/usr/local/bin/openclaw onboard
#
/usr/local/bin/openclaw gateway install --force
/usr/local/bin/openclaw gateway restart
sleep 20
/usr/local/bin/openclaw gateway status

Verify only one install remains:

which -a openclaw
/usr/local/bin/node -v

You want /usr/local/bin/openclaw, not the nvm one.

Docs: https://docs.openclaw.ai/install/uninstall

crude arrow
#

before installing coming like this?

#

Last login: Wed Apr 29 08:23:02 on ttys000
You have mail.
/Users/akkarthikeyan/.zshrc:source:2: no such file or directory: /Users/akkarthikeyan/.openclaw/completions/openclaw.zsh
akkarthikeyan@As-MacBook-Air ~ %

cold tapirBOT
#

Yes โ€” if you see OpenClaw output before reinstalling, it means something old is still installed/running:

  • old LaunchAgent still loaded
  • old gateway process still alive
  • old openclaw CLI still on PATH
  • old ~/.openclaw state still present

Do this full wipe, then verify before installing:

# Stop old service/processes
openclaw gateway stop 2>/dev/null || true
launchctl bootout gui/$UID/ai.openclaw.gateway 2>/dev/null || true
pkill -f openclaw-gateway 2>/dev/null || true
pkill -f "openclaw.*gateway" 2>/dev/null || true
#
# Remove LaunchAgent + state
rm -f ~/Library/LaunchAgents/ai.openclaw.gateway.plist
rm -rf ~/.openclaw ~/.openclaw-* ~/.openclaw.broken-*

# Remove CLI installs
/usr/local/bin/npm rm -g openclaw 2>/dev/null || true
~/.nvm/versions/node/v22.22.2/bin/npm rm -g openclaw 2>/dev/null || true

hash -r 2>/dev/null || true

Now verify itโ€™s gone:

which -a openclaw
#
lsof -nP -iTCP:18789 -sTCP:LISTEN
launchctl print gui/$UID/ai.openclaw.gateway

Expected:

  • which -a openclaw โ†’ no output / not found
  • lsof โ†’ no output
  • launchctl โ†’ could not find service

Only then reinstall.

#

That message is just your shell trying to load an OpenClaw completion file you deleted:

~/.zshrc:source:2: no such file or directory: ~/.openclaw/completions/openclaw.zsh

Fix it by removing/commenting that line from ~/.zshrc:

grep -n "openclaw.zsh\|openclaw/completions" ~/.zshrc

Then edit ~/.zshrc and delete that line, or run:

cp ~/.zshrc ~/.zshrc.bak
#
sed -i '' '/openclaw\/completions\/openclaw\.zsh/d' ~/.zshrc

Open a new terminal after that.

Then verify clean state:

which -a openclaw
lsof -nP -iTCP:18789 -sTCP:LISTEN
launchctl print gui/$UID/ai.openclaw.gateway

If those show no OpenClaw / no listener / service not found, youโ€™re ready to reinstall.

crude arrow
#

akkarthikeyan@As-MacBook-Air ~ % grep -n "openclaw.zsh|openclaw/completions" ~/.zshrc
2:source "/Users/akkarthikeyan/.openclaw/completions/openclaw.zsh"
akkarthikeyan@As-MacBook-Air ~ % cp ~/.zshrc ~/.zshrc.bak
akkarthikeyan@As-MacBook-Air ~ % sed -i '' '/openclaw/completions/openclaw.zsh/d' ~/.zshrc
akkarthikeyan@As-MacBook-Air ~ % which -a openclaw
lsof -nP -iTCP:18789 -sTCP:LISTEN
launchctl print gui/$UID/ai.openclaw.gateway
openclaw not found
Bad request.
Could not find service "ai.openclaw.gateway" in domain for user gui: 501
akkarthikeyan@As-MacBook-Air ~ %

cold tapirBOT
#

Perfect โ€” that means the wipe worked:

  • openclaw not found โœ…
  • no port listener output โœ…
  • LaunchAgent service not found โœ…

Now reinstall fresh:

curl -fsSL https://openclaw.ai/install.sh | bash -s -- --install-method npm --no-onboard

Then open a new terminal and verify:

which -a openclaw
#
openclaw --version
node -v

Then onboard/start:

openclaw onboard
openclaw gateway install --force
openclaw gateway restart
sleep 30
openclaw gateway status

If it asks to add shell completions again, thatโ€™s okay โ€” just donโ€™t worry if the file doesnโ€™t exist until after install finishes.

crude arrow
#

Health check failed: connect ECONNREFUSED 127.0.0.1:18789
โ”‚
โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฏ
โ”‚
โ—‡ Optional apps โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฎ
โ”‚ โ”‚
โ”‚ Add nodes for extra features: โ”‚
โ”‚ - macOS app (system + notifications) โ”‚
โ”‚ - iOS app (camera/canvas) โ”‚
โ”‚ - Android app (camera/canvas) โ”‚
โ”‚ โ”‚
โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฏ
โ”‚
โ—‡ Control UI โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฎ
โ”‚ โ”‚
โ”‚ Web UI: http://127.0.0.1:18789/ โ”‚
โ”‚ Web UI (with token): โ”‚
โ”‚ http://127.0.0.1:18789/#token=e3c12ba4b1a6b4cc904497a13446938d40456a7ec2ce โ”‚
โ”‚ 1611 โ”‚
โ”‚ Gateway WS: ws://127.0.0.1:18789 โ”‚
โ”‚ Gateway: not detected (connect ECONNREFUSED 127.0.0.1:18789) โ”‚
โ”‚ Docs: https://docs.openclaw.ai/web/control-ui โ”‚
โ”‚ โ”‚
โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฏ
โ”‚
โ—‡ Start TUI (best option!) โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฎ
โ”‚ โ”‚
โ”‚ This is the defining action that makes your agent you. โ”‚
โ”‚ Please take your time. โ”‚
โ”‚ The more you tell it, the better the experience will be. โ”‚
โ”‚ We will send: "Wake up, my friend!" โ”‚
โ”‚ โ”‚
โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฏ
โ”‚
โ—† How do you want to hatch your bot?
โ”‚ โ— Hatch in Terminal (recommended)
โ”‚ โ—‹ Do this later
โ””

cold tapirBOT
#

That screen is okay during onboarding: it generated the Control UI URL, but the background gateway service isnโ€™t running yet, so it says ECONNREFUSED.

Choose:

Hatch in Terminal (recommended)

Let it finish. After onboarding exits, run:

openclaw gateway install --force
openclaw gateway restart
sleep 60
openclaw gateway status
#

First fresh start can take a while because it installs bundled runtime deps.

Also: you pasted another #token=... URL. Since this is a public/support thread, rotate the gateway token after setup:

openclaw config set gateway.auth.token "$(openssl rand -hex 32)"
openclaw gateway restart

Then use the new dashboard URL from:

openclaw dashboard
crude arrow
#

How do you want to hatch your bot?
โ”‚ Hatch in Terminal (recommended)

๐Ÿฆž OpenClaw 2026.4.26 (be8c246)
I'll butter your workflow like a lobster roll: messy, delicious, effective.

openclaw tui - local embedded - agent main - session main
local ready | idle
agent main | session main | unknown | tokens ?
โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€

cold tapirBOT
#

Thatโ€™s good โ€” TUI is running in local embedded mode and says:

local ready | idle

So the fresh install itself is working.

Now, in a new terminal, start the background gateway service:

openclaw gateway install --force
openclaw gateway restart
sleep 60
openclaw gateway status
#

If it shows healthy, then rotate the token because it was pasted earlier:

openclaw config set gateway.auth.token "$(openssl rand -hex 32)"
openclaw gateway restart
openclaw dashboard

Use the new dashboard URL from openclaw dashboard.

crude arrow
#

Restarted LaunchAgent: gui/501/ai.openclaw.gateway
Timed out after 60s waiting for gateway port 18789 to become healthy.
Gateway process is running but port 18789 is still free (startup hang/crash loop or very slow VM startup).
Service runtime: status=running, state=running, pid=12819
Gateway port 18789 status: free.
Gateway restart timed out after 60s waiting for health checks.
Tip: openclaw gateway status --deep
Tip: openclaw doctor

Service: LaunchAgent (loaded)
File logs: /tmp/openclaw/openclaw-2026-04-29.log
Command: /Users/akkarthikeyan/.nvm/versions/node/v22.22.2/bin/node /usr/local/lib/node_modules/openclaw/dist/index.js gateway --port 18789
Service file: ~/Library/LaunchAgents/ai.openclaw.gateway.plist
Working dir: ~/.openclaw
Service env: OPENCLAW_GATEWAY_PORT=18789

Service config looks out of date or non-standard.
Service config issue: Gateway service PATH includes version managers or package managers; recommend a minimal PATH. (/Users/akkarthikeyan/.nvm/versions/node/v22.22.2/bin)
Service config issue: Gateway service uses Node from a version manager; it can break after upgrades. (/Users/akkarthikeyan/.nvm/versions/node/v22.22.2/bin/node)
Recommendation: run "openclaw doctor" (or "openclaw doctor --repair").
Config (cli): ~/.openclaw/openclaw.json
Config (service): ~/.openclaw/openclaw.json

Gateway: bind=loopback (127.0.0.1), port=18789 (service args)

Probe note: Loopback-only gateway; only local clients can connect.

Runtime: running (pid 12819)
Warm-up: launch agents can take a few seconds. Try again shortly.
Connectivity probe: failed
Probe target: ws://127.0.0.1:18789
timeout
Capability: unknown

Port 18789 is already in use.

  • pid 12819 akkarthikeyan: openclaw-gateway (127.0.0.1:18789)
  • Gateway already running locally. Stop it (openclaw gateway stop) or use a different port.
    Listening: 127.0.0.1:18789
    Troubles: run openclaw status
    Troubleshooting: https://docs.openclaw.ai/troubleshooting
    akkarthikeyan@As-MacBook-Air ~ %
cold tapirBOT
#

Youโ€™re still installing/restarting the service with nvm Node:

Command: /Users/.../.nvm/.../bin/node /usr/local/lib/node_modules/openclaw/dist/index.js

That means plain openclaw gateway install/restart is still picking node from nvm via PATH. Use /usr/local/bin/node explicitly.

Run this exact block:

# stop/remove bad service
launchctl bootout gui/$UID/ai.openclaw.gateway 2>/dev/null || true
pkill -f openclaw-gateway 2>/dev/null || true
rm -f ~/Library/LaunchAgents/ai.openclaw.gateway.plist
#
# reinstall service using Homebrew/system Node explicitly
env -i HOME="$HOME" USER="$USER" PATH="/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin" \
  /usr/local/bin/node /usr/local/lib/node_modules/openclaw/dist/index.js gateway install --force

env -i HOME="$HOME" USER="$USER" PATH="/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin" \
  /usr/local/bin/node /usr/local/lib/node_modules/openclaw/dist/index.js gateway restart

sleep 90

env -i HOME="$HOME" USER="$USER" PATH="/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin" \
  /usr/local/bin/node /usr/local/lib/node_modules/openclaw/dist/index.js gateway status

Then verify the service command. It should say: