Summary
autobot-ai-stack.service (the AI Processing Stack / agent router on :8080) crash-loops indefinitely — on the live install NRestarts=2968, status=1/FAILURE every ~5–10s since the 06-11 install. This is the real cause of the Code Sync / dashboard panel showing "AI Stack (ChromaDB): Connection refused" and "chromadb: Connection refused" (the panel probes the down :8080 server). ChromaDB itself (:8100) is healthy.
Root cause
The unit imports autobot_shared:
ai_api_server.py → agents.base_agent → src/agents/__init__ → kb_librarian_agent →
from autobot_shared.logging_manager import get_logger
→ ModuleNotFoundError: No module named 'autobot_shared'
- The ai-stack unit sets
Environment="PYTHONPATH=/opt/autobot/autobot-ai-stack:/opt/autobot/autobot-ai-stack/src:/opt/autobot/autobot-backend" — it omits /opt/autobot, where the standalone autobot_shared package lives.
autobot_shared is not installed into the backend venv's site-packages either: env -i .../venv/bin/python -c "import autobot_shared" → ModuleNotFoundError (it only resolves when /opt/autobot happens to be on PYTHONPATH).
- The
autobot-backend.service unit works only because its PYTHONPATH explicitly includes an autobot_shared path; the ai-stack unit template was never given the same.
Impact
AI Stack server permanently down → agent-router / AI-stack-backed features unavailable; dashboard shows ChromaDB-related services as "Connection refused" even though ChromaDB is fine; ~3000 restarts burning CPU.
Fix direction (repo)
In the ai-stack role's systemd unit template, add the standalone shared path to PYTHONPATH (…:/opt/autobot or the explicit /opt/autobot/autobot_shared parent) — mirroring the backend unit — OR install autobot_shared into the shared venv's site-packages so PYTHONPATH isn't load-bearing. Reconcile with #10020 (single authoritative autobot_shared).
Repro
Co-located install → systemctl status autobot-ai-stack shows auto-restart loop; sudo -u autobot env -i PYTHONPATH=<unit value> .../venv/bin/python -c "import autobot_shared" → ModuleNotFoundError.
Part of #9919 (deployment-install); related to #10020.
Summary
autobot-ai-stack.service(the AI Processing Stack / agent router on :8080) crash-loops indefinitely — on the live installNRestarts=2968,status=1/FAILUREevery ~5–10s since the 06-11 install. This is the real cause of the Code Sync / dashboard panel showing "AI Stack (ChromaDB): Connection refused" and "chromadb: Connection refused" (the panel probes the down :8080 server). ChromaDB itself (:8100) is healthy.Root cause
The unit imports
autobot_shared:Environment="PYTHONPATH=/opt/autobot/autobot-ai-stack:/opt/autobot/autobot-ai-stack/src:/opt/autobot/autobot-backend"— it omits/opt/autobot, where the standaloneautobot_sharedpackage lives.autobot_sharedis not installed into the backend venv's site-packages either:env -i .../venv/bin/python -c "import autobot_shared"→ ModuleNotFoundError (it only resolves when/opt/autobothappens to be on PYTHONPATH).autobot-backend.serviceunit works only because its PYTHONPATH explicitly includes anautobot_sharedpath; the ai-stack unit template was never given the same.Impact
AI Stack server permanently down → agent-router / AI-stack-backed features unavailable; dashboard shows ChromaDB-related services as "Connection refused" even though ChromaDB is fine; ~3000 restarts burning CPU.
Fix direction (repo)
In the ai-stack role's systemd unit template, add the standalone shared path to
PYTHONPATH(…:/opt/autobotor the explicit/opt/autobot/autobot_sharedparent) — mirroring the backend unit — OR installautobot_sharedinto the shared venv's site-packages so PYTHONPATH isn't load-bearing. Reconcile with #10020 (single authoritativeautobot_shared).Repro
Co-located install →
systemctl status autobot-ai-stackshows auto-restart loop;sudo -u autobot env -i PYTHONPATH=<unit value> .../venv/bin/python -c "import autobot_shared"→ ModuleNotFoundError.Part of #9919 (deployment-install); related to #10020.