网关故障排除
快速诊断
bash
openclaw gateway status
openclaw gateway probe
openclaw status --all
openclaw logs --follow常见问题
网关无法启动
症状: openclaw gateway 报错或立即退出
检查:
- 端口是否被占用bash
lsof -i :18789 - 配置是否有效bash
openclaw doctor - 查看日志bash
openclaw logs --follow
解决:
- 使用
--force强制启动 - 更换端口
--port 19000 - 修复配置问题
"unauthorized" 错误
症状: 连接时提示未授权
原因:
- Token/密码不匹配
- 设备未配对
- 认证过期
解决:
- 检查 token 配置
- 使用
openclaw dashboard获取正确的 URL - 重新配对设备
RPC 探测失败
症状: gateway status 显示 "RPC probe failed"
检查:
bash
openclaw gateway probe
openclaw health --verbose原因:
- 网关未运行
- 端口/绑定配置错误
- 认证问题
通道连接问题
症状: 通道显示离线或重连
检查:
bash
openclaw channels status --probe
openclaw channels logs --channel whatsappWhatsApp 常见问题:
- 需要重新扫码:
openclaw channels login - 会话过期:重新登录
Telegram 常见问题:
- Bot token 无效
- 网络问题
服务与手动运行不一致
症状: 服务运行时行为与手动不同
原因: 环境变量差异
解决:
- 检查服务使用的配置bash
openclaw gateway status - 确保环境变量在服务中可用
- 重新安装服务bash
openclaw gateway uninstall openclaw gateway install
日志位置
- 文件日志:
/tmp/openclaw/openclaw-*.log - 服务日志:
- macOS:
~/Library/Logs/openclaw/ - Linux:
journalctl --user -u openclaw
- macOS:
重置
如果问题持续:
bash
# 仅重置配置
openclaw reset --scope config
# 完全重置
openclaw reset --scope full