Files

95 lines
3.5 KiB
Markdown
Raw Permalink Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# 🐛 今日问题记录 — 2026年4月28日
---
## 1⃣ Docker代理配置不生效
**现象**`docker pull soulter/astrbot-t2i-service:latest` 返回 `EOF` 错误直连Docker Hub失败。
**尝试的方案**
| 方案 | 结果 |
|:---|:---:|
| systemd proxy.conf | ❌ 配置写入但systemctl被限制无法重启Docker |
| daemon.json proxies | ❌ 镜像源+代理都配了仍然EOF |
| daocloud镜像加速 | ❌ T2I镜像不在daocloud白名单 |
| 直接改镜像源为国内源 | ❌ 部分源失效,部分没有该镜像 |
**当前状态**未解决。改用裸机直接部署T2I绕过了这个问题。
**可能的根因**
- Docker daemon没有正确读取proxies配置
- 代理mihomo对Docker Hub的CONNECT请求有限制
- 容器内网络环境与宿主机代理不通
---
## 2⃣ mihomo代理导致SSH通道中断
**现象**SSH插件频繁报 `error: Channel not open for sending`需要重启SSH插件才能恢复。
**原因**mihomo的透明代理tun模式劫持了SSH连接导致SSH会话被中断。
**解决**在zashboard中暂时关闭代理重启SSH插件后恢复。
**教训**操作mihomo配置时要注意SSH通道的稳定性避免把自己锁在外面。
---
## 3⃣ Playwright Chromium安装失败
**现象**`python3 -m playwright install --with-deps chromium` 下载167MB文件超时。
**尝试的方案**
| 方案 | 结果 |
|:---|:---:|
| 直连Google CDN | ❌ 超时30秒timeout |
| PLAYWRIGHT_DOWNLOAD_HOST=国内镜像 | ❌ 404镜像没有对应版本 |
| apt install chromium-browser | ❌ snap源也超时 |
| 指定系统已有Chromium路径 | ❌ 系统根本没装Chromium |
**解决**直接用curl下载耗时9分39秒拉完218MB。
**教训**:大文件下载在有代理的服务器上可能要等很久,直接裸下载反而更快。
---
## 4⃣ systemd服务文件格式问题
**现象**`systemctl enable --now t2i``bad unit file setting`,所有配置行都提示 `Assignment outside of section`
**原因**用cat写入时漏写了 `[Unit]` `[Service]` `[Install]` 三个section头部。
**解决**重写service文件加上section头部。
**教训**创建systemd服务文件时要检查section头部是否存在`systemctl status` 查看具体错误信息。
---
## 5⃣ Chromium路径配置无效
**现象**:修改 `src/render.py``chromium.launch(executable_path="/usr/bin/chromium-browser")` 后T2I仍然报错找不到Playwright内置Chromium。
**原因**`executable_path` 参数是Playwright v1.58的headless shell专用参数设置后仍然需要Playwright内置Chromium的依赖库。系统安装的Chromium不是Playwright需要的headless shell版本。
**解决**下载Playwright专用的Chromium headless shell到cache目录恢复默认launch调用。
---
## 6⃣ GitHub推送代理拦截
**现象**`git push github master``Connection closed by 198.18.0.25 port 22`
**原因**mihomo虚拟网络接口劫持了SSH到GitHub的22端口连接。
**解决**:配置 `~/.ssh/config` 让github.com走443端口`ssh.github.com`)。
---
## 7⃣ 容器内无法使用宿主机代理
**现象**在AstrBot容器内通过 `host.docker.internal:7890` 访问mihomo代理时CONNECT请求被abort。
**原因**mihomo配置 `allow-lan: false`,禁止局域网连接。
**当前状态**未解决。后续需要在mihomo配置中开启 `allow-lan: true` 并设置用户认证。