跳到主要内容

故障排查

本页是症状索引。它把你带到正确命令和负责该领域的页面,而不是复制每一份 setup guide。 如需完整本地健康报告,先运行 anyy statusanyy doctor

如何使用本页

  1. 先运行下面的 first-step commands。
  2. 将失败区域匹配到症状索引。
  3. 按链接页面中的详细步骤修复。
  4. 如果要把输出发给别人,请先移除 secrets 和 tokens。

大多数命令接受 --home PATH;只要你不确定当前 active profile/home,就显式传入它。

先收窄范围

改 config 之前,先确认问题是跟着 profile、resident gateway、某个 channel,还是某个 session 走:

anyy profile list
anyy status --home ~/.anyy
anyy gateway status --home ~/.anyy

如果只有一个 channel 失败,先运行 anyy channels doctor CHANNEL。如果只有一段 conversation 失败,先在 active surface 中尝试 /status/sessions/history/stop,再编辑全局 config。

第一步:status 与 doctor

检查运行时 surface:

anyy status --home ~/.anyy
anyy status --home ~/.anyy --json

status 会报告 resolved home、profile、default role、timezone、gateway state、gateway listener、cron、heartbeat、storage 和 MCP summary。如果 gateway 可达,它会把 live gateway status 合入本地报告。

然后运行 doctor:

anyy doctor --home ~/.anyy
anyy doctor --home ~/.anyy --json

doctor 会检查 filesystem、profile、config validity、timezone、gateway listener、channel config 和 secret refs、cron、heartbeat、MCP 以及 storage。JSON 输出最适合 bug report,因为 每个 check 都有 namestatusdetail

症状索引

安装与更新

症状检查下一页
找不到 anyywhich anyyanyy --version安装
已安装版本与正在运行的 gateway 不一致anyy gateway statusGateway
更新检查失败anyy update --check --home ~/.anyy更新
需要移除 Anyyanyy uninstall --keep-data --yes--full --yes数据、留存与删除

Setup 与 providers

症状检查下一页
Config parse 或 validation 失败anyy config --home ~/.anyyanyy doctor --home ~/.anyy配置参考
Provider key 缺失检查 api_key_refcredential_ref 及其引用的 env/file/secret凭据与鉴权
选错模型anyy setup model --home ~/.anyy配置模型
Fallback routing 未使用anyy setup model fallback --home ~/.anyy配置模型

Gateway 无法启动或无法保持运行

症状检查下一页
TUI 可用但一次性 chat 失败启动 resident gateway:anyy gateway startGateway
Socket 无法连接anyy status --socket PATH;检查 anyy.sockruntime.jsonGateway
Service manager 不受支持anyy gateway status --home ~/.anyy常驻服务运行
Gateway 运行的是旧 binaryanyy gateway restart更新
Heartbeat 过旧或 degradedanyy heartbeat status --home ~/.anyyHeartbeat

Channels 不投递

症状检查下一页
Channel config 存在但 disabledanyy channels doctor CHANNEL --home ~/.anyyChannels Reference
Secret ref 失败解析该 channel 的 secret:env:file: 引用Channels Reference
Telegram 无响应anyy channels doctor telegram --home ~/.anyyTelegram 设置
配置变更未生效anyy channels reload --home ~/.anyyMessaging Gateway
Live smoke 是 warn设置 ANYY_LIVE_CHANNEL_TESTS=1 和该 channel 的测试环境变量Channels Reference

MCP server 失败

症状检查下一页
Server 未列出anyy mcp list --home ~/.anyyMCP 配置参考
Server config 存在但 tools 缺失anyy mcp show SERVER_ID --home ~/.anyy --jsonMCP 集成
Server 无法连接anyy mcp probe SERVER_ID --home ~/.anyyMCP 集成
Runtime 需要 reloadanyy mcp reload [SERVER_ID] --home ~/.anyyMCP 配置参考

认证错误

症状检查下一页
Env ref 为空env:NAME 引用运行 printenv NAME环境变量
Profile-local secret 缺失secret:<name> 引用检查 ~/.anyy/secrets/<name>数据、留存与删除
Provider auth profile 不受支持检查 provider 的 profileauth_modeauth_profileProvider 配置
OAuth 或 external auth 需要刷新重新运行 provider setup/auth flow凭据与鉴权

性能与状态体积

症状检查下一页
State database 变大anyy status --json 的 storage section数据、留存与删除
Raw backlog 增长anyy maintenance prune-inactive-sessions --home ~/.anyy维护
Token estimates 缺失anyy maintenance cache-token-estimates --home ~/.anyy --execute维护
Turn 卡住使用 TUI /stop/queue/btw/busy interruptSessions

常见模式

模式原因修复
TUI 可用,但 anyy chat 失败Embedded gateway 存在,但 resident gateway 不可达为同一个 home/profile 启动 resident gateway。
Default profile 可用,另一个 profile 失败Config、secrets、skills 或 channel state 是 profile-local在该 profile 中运行 setup,或只复制确实需要的 config。
Doctor 通过,但 live request 失败Doctor 主要是本地验证运行 provider、MCP 或 channel-specific live probe。
Secret 在 shell 中可用,但 service 不可用Service manager 没继承你的 shell environment存为 secret:,或注入到 service environment。

收集 Debug Bundle

在 active TUI 或兼容 command surface 中可用时,使用 debug 命令:

/debug

如果只有 CLI 输出,请收集:

anyy --version
anyy status --home ~/.anyy --json
anyy doctor --home ~/.anyy --json
anyy gateway status --home ~/.anyy

不要包含原始 secret values、bot tokens、OAuth credentials、private channel messages,或可能 包含用户数据的完整日志。Anyy 会脱敏已知 secret values,但你仍应审阅任何要分享的内容。

如何寻求帮助

提问时请包含:

  • Anyy version。
  • OS 和安装方式。
  • 你运行的精确命令。
  • 相关的 status --jsondoctor --json checks。
  • 问题是否只和某个 profile/home、某个 channel 或某个 session 相关。

避免发送会暴露 tokens、channel IDs、private messages,或你不想公开的本地文件系统路径的截图。