// PART 13
Troubleshooting and AI OS reference
This guide covers the failures operators and developers hit first, with the commands that answer them, and closes with the AI-OS surface map — which parts of the “AI OS” are wired and which are not.
Quick diagnostics
# CLI subcommands (botcorepkg/src/cli.rs): start, stop, restart, install,
# setup-env, remove, list, status, version, rotate-secret(s), vault
./botserver status <component> # per-component status
./botserver list # installed vs available components
./botserver restart # restart the server
# health and logs
curl -s http://localhost:8080/health
tail -f botserver.log
grep -E " E | W " botserver.log | tail -20
grep -E "drive_monitor|Registered tool" botserver.log | tail -20
Inside containers, service logs live in journalctl -u <service> and data in
the host mounts botserver-stack/<component>/{data,conf,logs}/.
Startup issues
| Symptom | Diagnosis and fix |
|---|---|
| Bootstrap hangs waiting for the server | the directory service may need longer than the wait window — check botserver.log for “Bootstrap process completed!”; services still start |
| “Database pool creation failed … connection refused” | Vault is sealed: unseal with the keys from the vault container’s init.json (vault operator unseal ×3, one session to keep the nonce) |
| Port already in use | lsof -i :<port>, stop the conflicting process |
| “dispatch failure” / certificate errors after start | check Vault TLS verification and the directory service logs |
| Bot not loaded | look for [drive_monitor] lines; verify the bucket ends in .gbai / .gborg layout |
Database issues
| Symptom | Fix |
|---|---|
| PostgreSQL fails to start | check the component log (journalctl -u tables or botserver-stack/tables/logs/ on host mounts); look for a corrupted data dir before reaching for pg_resetwal |
| Port 5432 conflict | a system PostgreSQL is running — stop it |
| Permissions | chmod 700 botserver-stack/data/tables/ |
| Migration error at boot | read the failing migration in botserver.log; fix forward with a new migration, never edit an applied one |
LLM issues
| Symptom | Fix |
|---|---|
| Requests to the local LLM fail | pgrep llama-server; check the endpoint port from the stack config; free -h for memory |
| Wrong model answers | Vault per-bot path llm-model / global secret/gbo/llm; the provider is built at boot, so changes need a restart |
| Every turn refuses with a subscription error | check the handshake log line (WS handshake: identity=...) — a guest identity looks up guest accounts |
| No tool calls happen | the bot is missing PROMPT-{CHANNEL}.md — the fallback prompt does not advertise tools |
AI OS surface — what is wired
| Capability | Status | Authority |
|---|---|---|
| Per-bot boot-time model provider from Vault | ✅ live path | state_builder.rs |
Retrieval modes (rag-mode, six modes) |
✅ live | core/bot/kb_context/ |
| Durable user memory + forgetting | ✅ live | botmemory, core/user_memory.rs |
| Agent VM (per-session Incus, snapshots, idle stop) | ✅ live | botagent |
__ui_plan__ planner over the app registry |
✅ live | main_module/ui_plan/ |
| API command catalog with RBAC filtering | ✅ live | core/bot/api_catalog/ |
| Consent gate for agent actions | ✅ live | botconsent |
| Skills catalog (Markdown skills, prompt-advertised) | ✅ live | botskills/**, /api/sources/skills |
| Multi-profile model router + circuit breaker + council | ⚠️ library API, no production caller | botllm/src/{router,breaker,council}.rs |
BASIC USE MODEL / SET MODEL ROUTING |
⚠️ persists a preference nothing reads | botbasic_ai/src/keywords/model_routing/ |
| Smart router (performance cache) | ❌ unreachable (unregistered keyword, unwritten cache) | botllm/src/smart_router.rs |
| WORKFLOW execution mode | ⚠️ planned (WORKFLOW_PLAN.md) |
compiler plan |
Treat the ⚠️/❌ rows as the honest boundary of the platform: configuring them today changes nothing in production behavior.
When nothing else helps
- Reproduce with one browser action and one log window open.
- Find the stage: transport (
ws/handler.rs), context (pipeline/), decision (llm/), execution (tool_exec/,exec/), delivery (sink.rs,channel_delivery.rs). - Check the durable record —
message_history,agent_runs,run_events— the pipeline’s own logs can lie under concurrency; the tables do not. - Fix the root cause, never restart to “fix” an error, and record the diagnosis in the issue.