Skip to content

Commit b696c99

Browse files
committed
docs(gateway): add process isolation troubleshooting
Signed-off-by: Ziyang Guo <121015044+RerankerGuo@users.noreply.github.com>
1 parent a21ef3f commit b696c99

2 files changed

Lines changed: 42 additions & 0 deletions

File tree

README.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -346,6 +346,28 @@ curl http://127.0.0.1:8420/health
346346
# Should return {"status":"ok"} or {"status":"degraded"}
347347
```
348348

349+
**8. Troubleshoot unexpected recall data**
350+
351+
If `/recall` returns another user's persona, scene paths, or data while your
352+
own data directory is empty, first confirm which Gateway process is actually
353+
serving port `8420`. On shared machines, WSL hosts, Docker hosts, SSH tunnels,
354+
or port-forwarded environments, `127.0.0.1:8420` may point to an older process
355+
or another user's sidecar.
356+
357+
```bash
358+
sudo lsof -iTCP:8420 -sTCP:LISTEN -nP
359+
PID=$(sudo lsof -tiTCP:8420 -sTCP:LISTEN | head -1)
360+
sudo readlink /proc/$PID/cwd
361+
sudo tr '\0' '\n' < /proc/$PID/environ | grep -E '^(HOME|USER|TDAI_DATA_DIR)='
362+
sudo lsof -p $PID | grep memory-tencentdb
363+
```
364+
365+
If the `cwd`, `HOME`, `USER`, or `TDAI_DATA_DIR` values point to another user
366+
or checkout, stop that Gateway or run your instance on a different port. Common
367+
causes are a previous process surviving a restart, two users sharing the same
368+
host port, Docker publishing `8420` only once per host, or an SSH/nginx/kubectl
369+
forward targeting the wrong process.
370+
349371
> For the complete provider reference (environment variables, troubleshooting, LLM tool schemas, supervisor behavior), see [`hermes-plugin/memory/memory_tencentdb/README.md`](./hermes-plugin/memory/memory_tencentdb/README.md). Please read it before adjusting the supervisor / circuit-breaker defaults.
350372

351373

README_CN.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -351,6 +351,26 @@ curl http://127.0.0.1:8420/health
351351
# 应返回 {"status":"ok"} 或 {"status":"degraded"}
352352
```
353353

354+
**8. 排查异常 recall 数据**
355+
356+
如果 `/recall` 返回了其他用户的 persona、scene 路径或记忆数据,而你自己的
357+
dataDir 是空的,先确认 `8420` 端口实际命中了哪个 Gateway 进程。在共享机器、
358+
WSL、Docker、SSH 隧道或端口转发环境中,`127.0.0.1:8420` 可能仍然指向旧进程
359+
或其他用户的 sidecar。
360+
361+
```bash
362+
sudo lsof -iTCP:8420 -sTCP:LISTEN -nP
363+
PID=$(sudo lsof -tiTCP:8420 -sTCP:LISTEN | head -1)
364+
sudo readlink /proc/$PID/cwd
365+
sudo tr '\0' '\n' < /proc/$PID/environ | grep -E '^(HOME|USER|TDAI_DATA_DIR)='
366+
sudo lsof -p $PID | grep memory-tencentdb
367+
```
368+
369+
如果 `cwd`、`HOME`、`USER` 或 `TDAI_DATA_DIR` 指向其他用户或其他 checkout,
370+
请先停止那个 Gateway,或把你自己的实例换到不同端口。常见原因包括:旧进程在
371+
restart 后仍存活、多人共用同一个宿主机端口、Docker 的 `8420` 端口只能被一个
372+
容器发布、SSH/nginx/kubectl 转发到了错误进程。
373+
354374
> Provider 的完整参考(环境变量、故障排查、LLM 工具 schema、supervisor 行为)见 [`hermes-plugin/memory/memory_tencentdb/README.md`](./hermes-plugin/memory/memory_tencentdb/README.md),调整 supervisor / circuit-breaker 默认值之前请先读它。
355375

356376

0 commit comments

Comments
 (0)