【服務信息】
- 服務名稱:moltbot
- 服務 ID:697a18cb06505fdd547f3543
- 項目 ID:697a1892f2339c9e766ca3c6
- 環境 ID:697a189286311f632dc23418
- 域名:https://yijensu.zeabur.app/
- 模板類型:PREBUILT_V2
- 應用類型:ClawdBot (ghcr.io/moltbot/clawdbot:main) 【問題描述】 服務無法啟動,返回 502 Bad Gateway 錯誤。 【錯誤信息】
- Startup probe failed: dial tcp 172.31.106.104:18789: connect: connection refused
- 應用程式未在端口 18789 上監聽
- 容器啟動但應用程式崩潰
- Uncaught exception: Error: EBADF: Closing file descriptor 27 on garbage collection failed, close
- 文件描述符洩漏
- 應用程式無法正確關閉文件
- Gateway token missing (open a tokenized dashboard URL or paste token in Control UI settings)
- 環境變數 CLAWDBOT_GATEWAY_TOKEN 設置的值不被應用程式接受
- 應用程式期望特殊的 token 格式
- Lane wait exceeded: lane=session:agent:main:main waitedMs=548648 queueAhead=1
- 請求在隊列中等待超過 9 分鐘
- 應用程式處理能力不足 【已執行的排查步驟】
- ✅ 修正 CLAWDBOT_GATEWAY_TOKEN 環境變數(從變數引用改為實際值)
- ✅ 配置 OpenAI API Key
- ✅ 配置 CLAWDBOT_GATEWAY_TRUSTED_PROXIES = *
- ✅ 配置 CLAWDBOT_TIMEOUT = 900000 (15 分鐘)
- ✅ 配置 CLAWDBOT_LOG_LEVEL = debug
- ✅ 增加內存到 2GB(後回退到 1GB)
- ✅ 多次重啟服務 【當前環境變數配置】
- CLAWDBOT_GATEWAY_TOKEN: Z6ztBJSb48g3Hp52aEl7Mu1Ux0DWXY9Q
- CLAWDBOT_GATEWAY_BIND: lan
- CLAWDBOT_GATEWAY_PORT: 18789
- CLAWDBOT_GATEWAY_TRUSTED_PROXIES: *
- CLAWDBOT_TIMEOUT: 900000
- CLAWDBOT_LOG_LEVEL: debug
- NODE_OPTIONS: --max-old-space-size=1024
- NODE_ENV: production
- OPENAI_API_KEY: [已配置]
- LINE_CHANNEL_ACCESS_TOKEN: [已配置]
- LINE_CHANNEL_SECRET: [已配置] 【請求的幫助】
- 診斷為什麼 ClawdBot 應用程式無法在 Zeabur 上啟動
- 確認 CLAWDBOT_GATEWAY_TOKEN 的正確格式和生成方式
- 解決文件描述符洩漏問題
- 提供 ClawdBot 在 Zeabur 上的推薦配置
- 檢查是否有已知的兼容性問題 【日誌摘要】
- 最新日誌時間:2026-01-29T02:43:25Z
- 服務狀態:STARTING(無法完成啟動)
- 容器狀態:已創建但應用程式崩潰
[Zeabur] Pod/service-697a18cb06505fdd547f3543-bd7cff5-lxgx7 - Unhealthy: Startup probe failed: dial tcp 172.31.106.104:18789: connect: connection refused 時間:2026-01-29T02:43:25Z
2026-01-29T02:42:14.490Z [clawdbot] Uncaught exception: Error: EBADF: Closing file descriptor 27 on garbage collection failed, close
2026-01-29T02:40:45.104Z [ws] closed before connect reason=unauthorized: gateway token missing (open a tokenized dashboard URL or paste token in Control UI settings)
2026-01-29T02:41:04.709Z [diagnostic] lane wait exceeded: lane=session:agent:main:main waitedMs=548648 queueAhead=1
bug, clawdbot, 502-error, startup-failed