#disconnected during update
1 messages · Page 1 of 1 (latest)
Yeah, that’s a known “gotcha”: openclaw update can restart the Gateway, and that drops the active chat/session, so from Telegram it looks like it “disconnected” mid-update. The FAQ explicitly calls this out as “possible, not recommended” for exactly this reason.
Docs: https://docs.openclaw.ai/help/faq#can-i-ask-openclaw-to-update-itself
What I’d do to recover on an AWS EC2 host (SSH in and run these, then paste outputs here):
- Get version + health snapshot
openclaw --version
openclaw gateway status
openclaw status --all
- Check whether Telegram is actually connected
openclaw channels status
openclaw channels logs --channel telegram
- Tail logs to see why it didn’t come back
openclaw logs --follow
# or if you want a paste:
openclaw logs --tail 200
- If the Gateway is not running / wedged
openclaw gateway restart
Docs: https://docs.openclaw.ai/help/faq#how-do-i-start-stop-restart-the-gateway-service
(and https://docs.openclaw.ai/help/faq#how-do-i-completely-stop-then-start-the-gateway)
Common EC2-specific cause after a restart/update
If your setup relies on env vars (Codex tokens, Telegram bot token, etc.), a service restart can “lose” your shell environment.
Fix options (from the FAQ):
- Put secrets into
~/.openclaw/.env(so the service can always load them), or - Enable shell env import (
env.shellEnv.enabled: true) and restart.
If you paste openclaw status --all + openclaw channels status here, I can tell you pretty quickly whether this is just “Gateway restarted” vs “Telegram token/auth missing” vs “update left the service in a bad state”.
ubuntu@ip-172-31-13-104:~$ openclaw status --all
openclaw: command not found
openclaw: command not found means the OpenClaw CLI isn’t on PATH for the ubuntu user (or it was installed under a different user / via a service).
On your EC2 box, can you paste the output of these (they’re all read-only):
whoami
echo "$PATH"
command -v openclaw || true
# common install locations (npm prefix / pnpm global bin)
ls -la ~/.npm-global/bin/openclaw ~/.local/share/pnpm/openclaw 2>/dev/null || true
npm -v && node -v
npm config get prefix
pnpm -v 2>/dev/null || true
pnpm bin -g 2>/dev/null || true
Quick “just tell me what’s running” check (even without the CLI)
systemctl --user list-units | grep -i openclaw || true
systemctl --user status openclaw-gateway.service || true
journalctl --user -u openclaw-gateway.service -n 200 --no-pager || true
Fast workaround (doesn’t require a global install)
If Node is present, try running OpenClaw via npx:
npx -y openclaw@latest --version
npx -y openclaw@latest status --all
That’ll tell us whether the Gateway is up and what broke during the update (often it’s simply “Gateway restarted so the Telegram session dropped”, or “service restarted but env vars/tokens weren’t available to the service”).
Once you paste the outputs above, I’ll tell you the exact next command (PATH fix vs service restart vs reinstall).
common install locations (npm prefix / pnpm global bin)
ls -la ~/.npm-global/bin/openclaw ~/.local/share/pnpm/openclaw 2>/dev/null || true
npm -v && node -v
npm config get prefix
pnpm -v 2>/dev/null || true
pnpm bin -g 2>/dev/null || true
ubuntu
/home/ubuntu/.npm-global/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin
10.9.4
v22.22.0
/home/ubuntu/.npm-global
openclaw-gateway.service loaded activating auto-restart OpenClaw Gateway (v2026.2.14)
â—Ź openclaw-gateway.service - OpenClaw Gateway (v2026.2.14)
Loaded: loaded (/home/ubuntu/.config/systemd/user/openclaw-gateway.service; enabled; preset: enabled)
Active: activating (auto-restart) (Result: exit-code) since Sun 2026-03-01 08:10:07 UTC; 758ms ago
Process: 178858 ExecStart=/usr/bin/node /home/ubuntu/.npm-global/lib/node_modules/openclaw/dist/index.js gateway --port 18789 (code=exited, status=1/FAILU>
Main PID: 178858 (code=exited, status=1/FAILURE)
CPU: 33ms
Mar 01 08:10:07 ip-172-31-13-104 systemd[748]: openclaw-gateway.service: Main process exited, code=exited, status=1/FAILURE
Mar 01 08:10:07 ip-172-31-13-104 systemd[748]: openclaw-gateway.service: Failed with result 'exit-code'.
lines 1-9/9 (END)
That output is the smoking gun: the Gateway service is crash-looping (status=1/FAILURE), so Telegram “disconnect” is just the gateway going down during/after the update.
Next step is to get the actual crash reason (systemd status alone doesn’t show it). On the EC2 box, please run and paste:
# 1) Gateway stderr/stdout from systemd (most important)
journalctl --user -u openclaw-gateway.service -n 200 --no-pager
# 2) OpenClaw’s own log files (often has the stack trace)
ls -la ~/.openclaw/logs 2>/dev/null || true
tail -n 200 ~/.openclaw/logs/gateway.err.log 2>/dev/null || true
tail -n 200 ~/.openclaw/logs/gateway.log 2>/dev/null || true
# 3) Common easy failure: port already in use
ss -ltnp | grep 18789 || true
Also: earlier you had openclaw: command not found, but the service is launching /home/ubuntu/.npm-global/lib/node_modules/openclaw/dist/index.js. Can you confirm whether the CLI binary exists?
ls -la ~/.npm-global/bin/openclaw || true
Two very common root causes after a bot-driven update:
- Broken/partial npm global install (bin missing / dist incomplete) → reinstall
openclawglobally, then restart the service. - Port 18789 already in use (stale process) → kill the listener or reclaim the port, then restart.
Once you paste the journalctl output, it’ll be obvious which one it is. (Feel free to redact tokens; logs should already be safe-ish, but better to be cautious.)
Mar 01 01:10:22 ip-172-31-13-104 node[14788]: Add parser-level tests for malformed top-level OpenRouter envelopes (e.g., missing/wrong-type choices) to complement route-level drift tests and catch provider-shape breaks earlier.
Mar 01 01:20:15 ip-172-31-13-104 node[14788]: 2026-03-01T01:20:15.314+00:00 [tools] web_search failed: Brave Search API error (429): {"type":"ErrorResponse","error":{"id":"c87226a7-a972-4b3a-a53b-b6a5e8508f5c","status":429,"detail":"Request rate limit exceeded for plan","meta":{"plan":"Free","rate_limit":1,"rate_current":1,"quota_limit":2000,"quota_current":1,"org_rate_limit":null,"org_rate_current":0,"component":"rate_limiter"},"code":"RATE_LIMITED"},"time":1772328015}
Mar 01 01:20:15 ip-172-31-13-104 node[14788]: 2026-03-01T01:20:15.482+00:00 [tools] web_search failed: Brave Search API error (429): {"type":"ErrorResponse","error":{"id":"c0f58d24-5c1a-4129-a34c-31cfb44e010e","status":429,"detail":"Request rate limit exceeded for plan","meta":{"plan":"Free","rate_limit":1,"rate_current":1,"quota_limit":2000,"quota_current":1,"org_rate_limit":null,"org_rate_current":0,"component":"rate_limiter"},"code":"RATE_LIMITED"},"time":1772328015}
Mar 01 01:20:15 ip-172-31-13-104 node[14788]: 2026-03-01T01:20:15.651+00:00 [tools] web_search failed: Brave Search API error (429): {"type":"ErrorResponse","error":{"id":"e5db2e94-266a-4912-bbb9-49cb4c00628f","status":429,"detail":"Request rate limit exceeded for plan","meta":{"plan":"Free","rate_limit":1,"rate_current":1,"quota_limit":2000,"quota_current":1,"org_rate_limit":null,"org_rate_current":0,"component":"rate_limiter"},"code":"RATE_LIMITED"},"time":1772328015}
Mar 01 01:20:55 ip-172-31-13-104 node[14788]: 2026-03-01T01:20:55.314+00:00 Done — your Sunday AI Business Workflows (Strategy + Leadership) report is ready, created from last-30-day signals and pushed to main.
Mar 01 01:20:55 ip-172-31-13-104 node[14788]: - File:
ubuntu@ip-172-31-13-104:~$ ls -la ~/.npm-global/bin/openclaw || true
ls: cannot access '/home/ubuntu/.npm-global/bin/openclaw': No such file or directory
That “asked it to update itself and then it got disconnected” is unfortunately pretty expected.
Per the FAQ, openclaw update can restart the Gateway, which drops the active session (so Telegram will look like it went silent mid-convo). Docs: https://docs.openclaw.ai/help/faq#can-i-ask-openclaw-to-update-itself
A couple notes on what you pasted:
- The
web_search failed … Brave … (429)lines are just Brave Search rate limiting (free plan is ~1 req/sec). Annoying, but not a gateway-killer by itself — it just makes search fail until it backs off. - The “Done — … report is ready …” line suggests the agent kept running and finished something; so the “disconnect” is more likely the chat session / websocket getting dropped during restart, not a total crash.
On the EC2 box, can you run these and paste output?
openclaw --version
openclaw gateway status
openclaw status
openclaw channels status
openclaw logs --follow
If it’s specifically Telegram that stopped responding, this one is super useful too:
openclaw channels logs --channel telegram
Pragmatic “don’t lose the chat next time” flow (run via SSH as the operator):
openclaw update --no-restart(so it updates without bouncing the gateway)- then restart at a convenient moment:
openclaw gateway restart
If you tell me what “disconnected” means in your case (Telegram bot silent vs Control UI says “disconnected from gateway”), I can point you at the shortest fix path.
ubuntu@ip-172-31-13-104:~$ ls -la ~/.npm-global/bin/openclaw || true
ls: cannot access '/home/ubuntu/.npm-global/bin/openclaw': No such file or directory
ubuntu@ip-172-31-13-104:~$ openclaw --version
openclaw gateway status
openclaw status
openclaw channels status
openclaw: command not found
openclaw: command not found
openclaw: command not found
openclaw: command not found
ubuntu@ip-172-31-13-104:~$ openclaw logs --follow
openclaw: command not found
~/.npm-global/bin/openclaw only exists if you previously did npm config set prefix ~/.npm-global (so “No such file or directory” there just means that isn’t your npm prefix, not necessarily that OpenClaw is gone).
On the EC2 box, run these to find where openclaw actually lives:
command -v openclaw || which openclaw || type -a openclaw
npm prefix -g
ls -la "$(npm prefix -g)/bin/openclaw" || true
ls -la "$(npm prefix -g)/bin" | head
npm ls -g --depth=0 | rg -i openclaw || true
Common outcomes:
openclawexists but PATH doesn’t include it
Add this to your shell rc and reload:
export PATH="$(npm prefix -g)/bin:$PATH"
- You installed via
npx/ ephemeral path earlier (common on VPS)
Then there may be no persistentopenclawbinary after a restart/update. Fix is: do a real global install, then repoint/restart the gateway service:
mkdir -p "$HOME/.npm-global"
npm config set prefix "$HOME/.npm-global"
export PATH="$HOME/.npm-global/bin:$PATH"
npm i -g openclaw@latest
openclaw doctor
openclaw gateway restart
After that, re-check:
openclaw --version
openclaw gateway status
openclaw logs --follow
If you paste the output of npm prefix -g + command -v openclaw, we can tell immediately whether this is just PATH/prefix, or if the install really disappeared.
mine might be running clawdbot
npm prefix -g
ls -la "$(npm prefix -g)/bin/openclaw" || true
ls -la "$(npm prefix -g)/bin" | head
npm ls -g --depth=0 | rg -i openclaw || true
-bash: type: openclaw: not found
npm error code ENOSPC
npm error syscall write
npm error errno -28
npm error nospc ENOSPC: no space left on device, write
npm error nospc There appears to be insufficient space on your system to finish.
npm error nospc Clear up some disk space and try again.
npm error A complete log of this run can be found in: /home/ubuntu/.npm/_logs/2026-03-02T10_49_51_418Z-debug-0.log
npm error code ENOSPC
npm error syscall write
npm error errno -28
npm error nospc ENOSPC: no space left on device, write
npm error nospc There appears to be insufficient space on your system to finish.
npm error nospc Clear up some disk space and try again.
npm error A complete log of this run can be found in: /home/ubuntu/.npm/_logs/2026-03-02T10_49_51_526Z-debug-0.log
ls: cannot access '/bin/openclaw': No such file or directory
npm error code ENOSPC
npm error syscall write
npm error errno -28
npm error nospc ENOSPC: no space left on device, write
npm error nospc There appears to be insufficient space on your system to finish.
npm error nospc Clear up some disk space and try again.
npm error A complete log of this run can be found in: /home/ubuntu/.npm/_logs/2026-03-02T10_49_51_639Z-debug-0.log
lrwxrwxrwx 1 root root 7 Apr 22 2024 /bin -> usr/bin
npm error code ENOSPC
npm error syscall write
npm error errno -28
npm error nospc ENOSPC: no space left on device, write
npm error nospc There appears to be insufficient space on your system to finish.
npm error nospc Clear up some disk space and try again.
npm error A complete log of this run can be found in: /home/ubuntu/.npm/_logs/2026-03-02T10_49_51_782Z-debug-0.log
Command 'rg' not found, but can be installed with:
sudo snap install ripgrep # version 12.1.0, or
sudo apt install ripgrep # version 14.0.3-1
See 'snap info ripgrep' for additional versions.
Yep — that output means the openclaw CLI isn’t installed (or isn’t on PATH) for the ubuntu user on the EC2 box right now. That’s why every openclaw … command is command not found, and ~/.npm-global/bin/openclaw also doesn’t exist.
This commonly happens if the original install was done via npx / an ephemeral path (works until the path disappears), or it was installed under a different user (root vs ubuntu).
1) First: find out if it’s installed anywhere
Run these and paste output:
echo "$PATH"
node -v
npm -v
npm prefix -g
npm root -g
npm ls -g --depth=0 | egrep -i 'openclaw|clawdbot' || true
ls -la "$(npm prefix -g)/bin" | egrep -i 'openclaw|clawdbot' || true
2) If it’s not installed: reinstall cleanly (recommended)
This makes global installs user-writable and ensures PATH is correct:
mkdir -p "$HOME/.npm-global"
npm config set prefix "$HOME/.npm-global"
export PATH="$HOME/.npm-global/bin:$PATH"
echo 'export PATH="$HOME/.npm-global/bin:$PATH"' >> ~/.bashrc
npm i -g openclaw@latest
openclaw --version
Then repair the gateway service (important if it was pointing at an old/temporary path):
openclaw doctor
openclaw gateway restart
3) Check if the gateway service is running (even before reinstall)
On Ubuntu this is often systemd:
systemctl --user status openclaw-gateway.service --no-pager || true
journalctl --user -u openclaw-gateway.service -n 200 --no-pager || true
sudo systemctl status openclaw-gateway.service --no-pager || true
sudo journalctl -u openclaw-gateway.service -n 200 --no-pager || true
Once you paste the outputs from step (1), we can tell immediately whether this is just “installed under a different prefix/user” vs “not installed at all”, and which exact reinstall path to take.
The npm … commands failing with ENOSPC: no space left on device is the big smoking gun here. When disk is full, npm can’t even print its prefix, installs/updates fail, and the gateway can crash / stop writing state — which can look like “got disconnected during update”.
Also: yes, if you installed before the rename, your CLI might be clawdbot (old name) instead of openclaw.
1) Confirm what’s full (space vs inodes)
Run:
df -h /
df -i /
sudo journalctl --disk-usage || true
2) Quick, usually-safe space recovery
Start with the low-risk stuff:
sudo apt-get clean
sudo journalctl --vacuum-size=200M
Then see what’s actually huge (these are read-only commands):
du -sh ~/.openclaw ~/.npm ~/.cache 2>/dev/null || true
sudo du -sh /var/log/* 2>/dev/null | sort -h | tail -20
3) After you’ve freed some space: check which CLI you have
command -v openclaw || true
command -v clawdbot || true
openclaw --version || true
clawdbot --version || true
4) If neither command exists after space is fixed
Reinstall (pick one — this is the common “no sudo needed” path):
mkdir -p "$HOME/.npm-global"
npm config set prefix "$HOME/.npm-global"
export PATH="$HOME/.npm-global/bin:$PATH"
echo 'export PATH="$HOME/.npm-global/bin:$PATH"' >> ~/.bashrc
npm i -g openclaw@latest
openclaw --version
openclaw doctor
openclaw gateway restart
If you paste df -h / and the command -v openclaw/clawdbot output after freeing space, we can tell whether you just need a reinstall vs you already have a systemd service running under a different user.
npm error code ENOSPC
npm error syscall write
npm error errno -28
npm error nospc ENOSPC: no space left on device, write
npm error nospc There appears to be insufficient space on your system to finish.
npm error nospc Clear up some disk space and try again.
npm error A complete log of this run can be found in: /home/ubuntu/.npm/_logs/2026-03-02T10_51_58_487Z-debug-0.log
npm error code ENOSPC
npm error syscall write
npm error errno -28
npm error nospc ENOSPC: no space left on device, write
npm error nospc There appears to be insufficient space on your system to finish.
npm error nospc Clear up some disk space and try again.
npm error A complete log of this run can be found in: /home/ubuntu/.npm/_logs/2026-03-02T10_51_58_597Z-debug-0.log
npm error code ENOSPC
npm error syscall write
npm error errno -28
npm error nospc ENOSPC: no space left on device, write
npm error nospc There appears to be insufficient space on your system to finish.
npm error nospc Clear up some disk space and try again.
npm error A complete log of this run can be found in: /home/ubuntu/.npm/_logs/2026-03-02T10_51_58_706Z-debug-0.log
ubuntu@ip-172-31-13-104:~$ ls -la "$(npm prefix -g)/bin" | egrep -i 'openclaw|clawdbot' || true
npm error code ENOSPC
npm error syscall write
npm error errno -28
npm error nospc ENOSPC: no space left on device, write
npm error nospc There appears to be insufficient space on your system to finish.
npm error nospc Clear up some disk space and try again.
npm error A complete log of this run can be found in: /home/ubuntu/.npm/_logs/2026-03-02T10_52_09_869Z-debug-0.log
ENOSPC is your real blocker right now — and it’s why even npm prefix -g is failing (npm tries to write cache/logs, can’t, so it can’t even tell you where global bins live). Until you free disk (or inodes), updates / installs / status checks are basically toast and the gateway can misbehave.
Do this on the EC2 box:
1) Confirm what’s full (space vs inodes)
df -h /
df -i /
2) Quick wins to free space (usually safe)
sudo apt-get clean
sudo journalctl --disk-usage
sudo journalctl --vacuum-size=200M
Also nuke npm’s log files (not packages) — these can be big and are safe to delete:
du -sh ~/.npm/_logs 2>/dev/null || true
rm -rf ~/.npm/_logs/* 2>/dev/null || true
3) If still full: find the top offenders
du -sh ~/.openclaw ~/.npm ~/.cache 2>/dev/null || true
sudo du -sh /var/log/* 2>/dev/null | sort -h | tail -20
sudo du -xh / | sort -h | tail -30 # can take a bit
If you’re running Docker on that instance, it’s often the culprit (but pruning is a bit more “destructive”):
docker system df 2>/dev/null || true
(If that shows lots of reclaimable space, tell me and I’ll suggest the least-risky prune command.)
4) Once you have some free space, re-check the CLI name
Older installs may still be clawdbot:
command -v openclaw || true
command -v clawdbot || true
Paste the output of df -h / and df -i / and we can pick the fastest cleanup path (and confirm whether you’re on openclaw vs clawdbot).
316M /home/ubuntu/.openclaw/extensions
316M /home/ubuntu/.openclaw/extensions/openclaw-mem0
327M /usr/src
357M /usr/bin
432M /home/ubuntu/.npm-global/lib/node_modules/.openclaw-GwBTAFqU/node_modules/@node-llama-cpp/linux-x64-cuda-ext
432M /home/ubuntu/.npm-global/lib/node_modules/.openclaw-GwBTAFqU/node_modules/@node-llama-cpp/linux-x64-cuda-ext/bins
432M /home/ubuntu/.npm-global/lib/node_modules/.openclaw-GwBTAFqU/node_modules/@node-llama-cpp/linux-x64-cuda-ext/bins/linux-x64-cuda
432M /home/ubuntu/.npm-global/lib/node_modules/.openclaw-GwBTAFqU/node_modules/@node-llama-cpp/linux-x64-cuda-ext/bins/linux-x64-cuda/fallback
443M /usr/share
533M /home/ubuntu/.openclaw/workspace/projects/mission-control/node_modules
534M /home/ubuntu/.openclaw/workspace/projects/mission-control
575M /home/ubuntu/.openclaw/workspace/projects
580M /home/ubuntu/.openclaw/workspace
607M /var/lib/snapd/cache
677M /home/ubuntu/.npm-global/lib/node_modules/.openclaw-GwBTAFqU/node_modules/@node-llama-cpp
760M /var/lib/snapd
778M /usr/lib/x86_64-linux-gnu
909M /home/ubuntu/.openclaw
1.1G /var/lib
1.2G /home/ubuntu/.npm-global/lib/node_modules/.openclaw-GwBTAFqU/node_modules
1.2G /var
1.3G /home/ubuntu/.npm-global/lib/node_modules/.openclaw-GwBTAFqU
1.4G /home/ubuntu/.npm-global
1.4G /home/ubuntu/.npm-global/lib
1.4G /home/ubuntu/.npm-global/lib/node_modules
1.6G /usr/lib
2.5G /home
2.5G /home/ubuntu
2.9G /usr
6.7G /
That du output is super helpful — you’re not “mysteriously broken”, you’re just on a tiny root disk and it’s full enough that npm can’t even write its own logs (ENOSPC), so installs/updates/status commands fall over.
Two big takeaways from what you posted:
~/.npm-global/lib/node_modules/.openclaw-GwBTAFqUis 1.3G and looks like a temp/side install directory (the random suffix is a hint).~/.openclaw/workspace/projects/mission-control/node_modulesis ~533M (re-creatable).
Step 0: confirm what’s actually running (so we don’t delete the thing systemd is executing)
Run one of these (depending on how you installed):
systemctl --user status openclaw-gateway.service --no-pager || true
sudo systemctl status openclaw-gateway.service --no-pager || true
In the output, look for the command path (ExecStart). If it references that .openclaw-GwBTAFqU directory, don’t delete it until after you reinstall/repair.
Fastest “free space now” (lowest regret)
If you’re OK re-installing deps later, this is usually the best immediate win:
rm -rf ~/.openclaw/workspace/projects/mission-control/node_modules
rm -rf ~/.npm/_logs/* 2>/dev/null || true
sudo apt-get clean
sudo journalctl --vacuum-size=200M
That should buy you ~700MB+ quickly.
The big 1.3G win (only if it’s NOT the active ExecStart)
If systemctl … status shows the gateway is not running from .openclaw-GwBTAFqU, you can delete that whole temp folder: