[Bug]: fw doctor Watchtower smoke test probes localhost, so all endpoints fail when Watchtower is bound to FW_HOST

已关闭 适合新手
#97 5 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
2/5
预计耗时
1-3 小时
新手友好度
76/100
Issue 类型
缺陷
描述清晰度
描述清楚
活跃度
活跃
技术栈
python, shell
领域
cli, testing

调研方向

阅读 bin/fw 第 3649 行和第 3672 行附近的内容,然后阅读 web/smoke_test.py 第 116 行和第 184-187 行附近的内容。跟踪 fw doctor 如何解析 _doctor_wt_url 并传递 smoke test 参数;完成的标准是 smoke test 检查已验证的 URL,并且当 Watchtower 绑定到非 loopback 的 FW_HOST 时能够成功。为 smoke test 的 base URL 参数和 fw doctor 调用添加或运行覆盖测试。

由索引模型根据 Issue 内容生成。

描述

area:cli bug severity:medium status:fixed-on-bleeding-edge triaged
Bug Description

fw doctor first finds Watchtower at its real address: bin/fw:3649 resolves _watchtower_url (identity-verified) and checks ${_doctor_wt_url}/health. It then runs the smoke test with the port only:

  • bin/fw:3672: python3 "$FRAMEWORK_ROOT/web/smoke_test.py" --port "$_doctor_wt_port" --json
  • web/smoke_test.py:116: base = f"http://localhost:{port}"
  • web/smoke_test.py:184-187: the only arguments are --port, --test-client and --json; there is no way to pass a host.

When Watchtower is started with FW_HOST=<a non-loopback address> (as documented, to avoid listening on 0.0.0.0), it does not listen on localhost, so every probe is refused while the health check just passed.

Steps to Reproduce
  1. FW_HOST=<a LAN or VPN address of the host> fw watchtower start --port 3010
  2. curl -s -o /dev/null -w '%{http_code}' http://<that address>:3010/ returns 200.
  3. fw doctor prints WARN Watchtower smoke: 53/53 endpoints failed, each with <urlopen error [Errno 111] Connection refused>.
  4. python3 web/smoke_test.py --port 3010 --json gives the same 53 failures.
Expected Behavior

The smoke test probes the same base URL that fw doctor has just verified (for example a --base-url argument fed with $_doctor_wt_url, defaulting to localhost when absent).

Actual Behavior

WARN Watchtower smoke: 53/53 endpoints failed on every fw doctor run, while all pages answer 200 at the real address. A permanent false warning hides a real smoke failure.

fw doctor output

AI Agent

Claude Code

Operating System

Linux

Additional Context

1.8.11 (e42aa41bf), vendored consumer, Linux (Ubuntu 20.04, systemd 245), Claude Code. Watchtower started with FW_HOST set to a VPN address, as the operator's rule requires.

主要语言
Shell
星标
16
派生
6
PR 合并指标
30 天内没有已合并 PR

环境准备

  • 提供 Dockerfile 或 Docker Compose 文件
  • 没有 Pull Request 模板
  • 阅读贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

DimitriGeelen/agentic-engineering-framework 的其他 Issue

查看 DimitriGeelen/agentic-engineering-framework 的全部 Issue

相似的 Issue

更多 Shell/Bash Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。