故障排查
排查連線、執行、實時更新、郵件和自託管服務中的常見問題。
先確認問題發生在哪一層:Multica 服務、守護程序、執行時,還是 AI 程式設計工具。下面幾條命令通常足以找到第一條有效錯誤:
multica version
multica auth status
multica daemon status --output json
multica daemon logs --lines 100/health 只說明 API 程序正在響應;/readyz 還會檢查資料庫和 migration。反饋問題時附上報錯、相關日誌、CLI 版本和作業系統,提交前刪掉令牌、信箱等敏感資訊。
連線與登入
執行與 AI 程式設計工具
Web 應用與自託管服務
日誌位置
| 元件 | 檢視方式 |
|---|---|
| 後臺守護程序 | multica daemon logs --lines 100 |
| 實時跟隨守護程序日誌 | multica daemon logs --follow |
| 預設 profile 的日誌檔案 | ~/.multica/daemon.log |
| 預設 profile 的啟動或崩潰日誌 | ~/.multica/daemon.err.log |
| 命名 profile | ~/.multica/profiles/<name>/ 下的對應日誌 |
| Docker backend | docker compose -f docker-compose.selfhost.yml logs -f backend |
| 瀏覽器 | 開發者工具中的 Console 和 Network |
哪個檔案是當前活躍的日誌,取決於守護程序啟動時使用的 profile。早前守護程序留下的舊日誌也能正常開啟,很容易看錯檔案。所以不要憑猜測開啟檔案:multica daemon logs 會在輸出日誌內容前先列印它解析到的絕對路徑。讀命名 profile 的日誌時加上 --profile <name>。
需要直接觀察守護程序啟動過程時,可以改為前臺執行:
multica daemon stop
multica daemon start --foreground仍然無法定位時,到 GitHub Issues 搜尋已有問題,或提交新的 issue。