ttpos-doctor
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
Chinesettpos-doctor
ttpos-doctor
先读 。遇到环境问题先跑它,别逐个猜。
ttpos-sharedbash
ttpos doctor --format json # 只查本机,不访问 TTPOS 服务端
ttpos doctor --network --format json # 追加 upstream 项,实际连一次服务端agent 必须显式加 :这条命令被调用时默认仍输出文本。
--format jsonRead first. When encountering an environment issue, run it first instead of guessing one thing at a time.
ttpos-sharedbash
ttpos doctor --format json # Checks only the local machine and does not access the TTPOS server
ttpos doctor --network --format json # Adds the upstream check and actually connects to the server onceThe agent must explicitly add : when this command is invoked, it still outputs text by default.
--format json读输出
Reading the Output
json
{"ok":false,"checks":[{"id":"auth","status":"fail","label":"登录态","detail":"未登录","fix":"运行 ttpos auth login"}],"summary":{"ok":3,"warn":2,"fail":1,"skip":0}}- 顶层 :没有
ok就是fail,true、warn不影响。能不能继续跑业务命令读它就够。skip - :
statusokwarnfail。skip不是通过,是前序失败后没有跑。skip - 可能不存在,这时线索在
fix(如detail失败时是服务端原文)。upstream
退出码与其他命令不同: 没有 fail; 至少一项 fail(未登录也是 1,不是 3); 用法错误。
012json
{"ok":false,"checks":[{"id":"auth","status":"fail","label":"登录态","detail":"未登录","fix":"运行 ttpos auth login"}],"summary":{"ok":3,"warn":2,"fail":1,"skip":0}}- Top-level : it is
okwhen there are notrueresults;failandwarndo not affect it. Reading this field is sufficient to determine whether business commands can continue.skip - :
status,ok,warn, orfail.skipdoes not mean success; the check was not run because an earlier check failed.skip - may be absent, in which case the clue is in
fix(for example, andetailfailure contains the server's original response text).upstream
Exit codes differ from those of other commands: means there are no failures; means at least one check failed (not being logged in is also , not ); means a usage error.
01132各项检查
Individual Checks
| id | 异常时怎么处理 |
|---|---|
| |
| 会话库被占用:等其他 ttpos 进程结束后重试,不要设 |
| 没有 token 也是 |
| 只会 |
| |
| |
| 只在 |
连锁规则: 为 时 、 跳过; 不是 时 跳过。 只是 不会触发跳过。
gatewayfailauthupstreamauthokupstreamgatewaywarn| id | How to handle an abnormal result |
|---|---|
| |
| The session store is in use: wait for other ttpos processes to finish, then retry. Do not set |
| Having no token is also |
| It can only be |
| For |
| |
| It appears only with |
Chained rules: when is , and are skipped. When is not , is skipped. A from alone does not trigger any skips.
gatewayfailauthupstreamauthokupstreamwarngateway