# 2026-03-09（Mon）OpenClaw 日志

## 今日摘要（按时间线）
- 03-08 04:44：检测到一次 `openclaw.json` 配置写入（config-audit 记录，来源 `openclaw gateway --port 18789`）。
- 03-08 11:49：network-watchdog 快速通道曾报 `STILL UNHEALTHY: no reboot configured`，随后在 11:51 起恢复为 healthy。
- 03-08 11:55：fast watchdog 自动降级回 2 小时慢速巡检，之后至 03-09 02:26 慢速巡检持续 healthy。
- 03-08 全天：health-monitor 每小时写入 health.json，`severity=warn` 连续计数持续递增（未转为 fatal）。
- 03-08 18:58~19:00：gateway-daemon 反复拉起 gmail-watcher，出现 `resolve user config dir: $HOME is not defined`，gog 进程循环退出并 5s 重试。
- 03-09 02:59~03:00：重复尝试启动 Gateway 时提示端口 18789 已被现有实例占用（`openclaw-gateway` 已在运行）。
- 近 24h：`halewongai.github.io` 仓库无新 commit（最近一次为 03-07）。
- `openclaw_log/watchdog/watchdog.log` 无新增（仅保留 02-03 的初始健康检查记录）。

## 关键操作（命令/配置/服务变更）
- 日志快速扫描（最近 24h）：
  - `/var/root/.openclaw/logs/gateway-daemon.out.log`
  - `/var/root/.openclaw/logs/gateway-daemon.err.log`
  - `/var/root/.openclaw/logs/network-watchdog.log`
  - `/var/root/.openclaw/logs/health-monitor.log`
  - `/var/root/.openclaw/logs/config-audit.jsonl`
- Git 检查（按要求使用 hale 登录 shell）：
  - `su -l hale -c "cd /Users/hale/Desktop/github/halewongai.github.io && git log --since='24 hours ago' ..."`
  - 结果：最近 24h 无提交。
- 关键结论（网络/权限相关）：
  - gmail-watcher 当前失败核心是运行环境缺失 `$HOME`（导致 gog 无法解析用户配置目录），并非网络连通性错误。
  - 18789 端口冲突来自“已有 gateway 实例在跑”，后续应避免重复 start（先 status/stop 再 start）。

## 交付物 / 链接
- 日志文件：`/Users/hale/Desktop/openclaw_log/daily/2026-03-09.md`
- 日志索引：`/Users/hale/Desktop/openclaw_log/INDEX.md`
- 站点仓库：`/Users/hale/Desktop/github/halewongai.github.io`（近 24h 无新增 commit）

## 待办（1-5 条）
1. 修复 gmail-watcher 启动环境：为 watcher/gog 进程显式提供 `HOME=/Users/hale`（或改为以 hale 用户启动），验证重试风暴是否消失。
2. 在 Gateway 管理脚本中加入“启动前端口占用/实例存活检查”，避免重复 start 导致噪声日志。
3. 跟踪 health-monitor 长期 `severity=warn` 的根因，明确触发项并制定降噪或修复计划。
4. 观察 network-watchdog 的 fast/slow 切换策略是否稳定，必要时补充阈值说明文档。
