首页
开始 安装引导快速开始文档总览
文档 渠道接入模型与 APIGateway 运维Tools 与 Skills
更多 精选文章资源导航帮助中心
开始安装
文档导航 Gateway 运维
Gateway 运维 3 个部分

Deep Troubleshooting

Gateway 故障排除

当问题已经定位到 Gateway 这一层,例如服务看起来在跑但端口没监听、UI 未授权、provider 凭证失效或远程模式配置错位时,这一页比通用帮助页更直接。

诊断顺序

状态与摘要

openclaw status
openclaw status --all
openclaw status --deep

Gateway 与渠道探测

openclaw gateway probe
openclaw gateway status
openclaw channels status --probe

实时日志

openclaw logs --follow
调试 Gateway 问题时,日志几乎总是比“看起来像在运行”更可信。

常见故障

No API key found for provider "anthropic"

通常意味着当前智能体的认证存储为空。认证是按智能体隔离的,新智能体不会自动继承主智能体密钥。修复方式是重新运行向导,或在 Gateway 主机上执行 openclaw models auth setup-token --provider anthropic,然后再用 openclaw models status 验证。

Control UI 在 HTTP 下提示 device identity required / connect failed

如果你通过纯 HTTP 访问远程 Control UI,浏览器会处于不安全上下文,无法生成设备身份。优先改用 Tailscale Serve / HTTPS,或者直接在 Gateway 主机本地打开 http://127.0.0.1:18789/

服务已安装但没有真正运行

先执行 openclaw gateway statusopenclaw doctor。监管器显示“已加载”不代表进程健康;进一步查看 openclaw logs --follow、文件日志或 systemd / launchd 的最近输出。

Gateway start blocked: set gateway.mode=local

说明配置文件存在,但 gateway.mode 不是 local。运行 openclaw configure 重新设定,或直接执行 openclaw config set gateway.mode local

服务运行着,但端口没有监听

优先确认 CLI 和服务使用的是同一份配置。若 Config (cli)Config (service) 不一致,重新从目标 profile 执行 openclaw gateway install --force。若日志提示 refusing to bind without auth,说明你把 bind 改成非 loopback,却没配置 gateway.auth.token

为什么 gateway status 显示 running,但 RPC probe failed

表示监管器认为进程活着,但 CLI 无法通过 WebSocket 成功探测它。通常是端口错误、配置漂移、未监听、认证或远程 URL 指向错位置。此时应优先信任 Probe targetConfig (service) 和日志。