2.0 KiB
2.0 KiB
summary, read_when
| summary | read_when | |
|---|---|---|
| Health check steps for Baileys/WhatsApp connectivity |
|
Health Checks (CLI)
Short guide to verify the WhatsApp Web / Baileys stack without guessing.
Quick checks
clawdbot status— local summary: whether creds exist, auth age, session store path + recent sessions.clawdbot status --deep— also probes the running Gateway (WhatsApp connect + Telegram + Discord APIs).clawdbot health --json— asks the running Gateway for a full health snapshot (WS-only; no direct Baileys socket).- Send
/statusin WhatsApp/WebChat to get a status reply without invoking the agent. - Logs: tail
/tmp/clawdbot/clawdbot-*.logand filter forweb-heartbeat,web-reconnect,web-auto-reply,web-inbound.
Deep diagnostics
- Creds on disk:
ls -l ~/.clawdbot/credentials/creds.json(mtime should be recent). - Session store:
ls -l ~/.clawdbot/sessions/sessions.json(legacy:~/.clawdbot/sessions.json; path can be overridden in config). Count and recent recipients are surfaced viastatus. - Relink flow:
clawdbot logout && clawdbot login --verbosewhen status codes 409–515 orloggedOutappear in logs. (Note: the QR login flow auto-restarts once for status 515 after pairing.)
When something fails
logged outor status 409–515 → relink withclawdbot logoutthenclawdbot login.- Gateway unreachable → start it:
clawdbot gateway --port 18789(use--forceif the port is busy). - No inbound messages → confirm linked phone is online and the sender is allowed (
whatsapp.allowFrom); for group chats, ensure mention rules match (routing.groupChat.mentionPatternsandwhatsapp.groups).
Dedicated "health" command
clawdbot health --json asks the running Gateway for its health snapshot (no direct Baileys socket from the CLI). It reports linked creds, auth age, Baileys connect result/status code, session-store summary, and a probe duration. It exits non-zero if the Gateway is unreachable or the probe fails/timeouts. Use --timeout <ms> to override the 10s default.