Troubleshooting¶
Common problems and how to fix them.
Setup Issues¶
llm-sidecar/ directory is empty¶
Cause: You cloned without --recurse-submodules.
Fix:
git submodule update --init --recursive
Then rebuild if you've already run make up:
make rebuild
make up fails with "no matching manifest for linux/arm64"¶
Cause: Some Docker images don't have ARM builds (common on Apple Silicon Macs).
Fix: Ensure you're using Docker Desktop 4.x+ which supports Rosetta emulation. If still failing, try:
DOCKER_DEFAULT_PLATFORM=linux/amd64 make up
Unknown database 'vlsm' / No database selected (ERROR 1046)¶
Cause: The SQL dump doesn't include CREATE DATABASE / USE statements, or the database name in .env doesn't match what was actually imported.
Fix:
- Create the database and re-import, specifying the target database explicitly:
make db-import FILE=path/to/dump.sql DB=vlsm - Make sure
QUERY_DB_NAMEin.envmatches the database you imported into:QUERY_DB_NAME=vlsm - Restart:
make down && make up
If your database has a different name (e.g. vlsm-drc), use that name in both the DB= parameter and QUERY_DB_NAME.
.env: no such file or directory¶
Cause: You haven't created the .env file.
Fix:
cp .env.example .env
Then add at least one LLM API key via Settings → API Keys in the browser, or edit .env directly.
Service Health Issues¶
App shows "not ready" in make status¶
Possible causes:
- MySQL not ready yet — The app depends on MySQL. Wait 30 seconds and try again.
- Wrong database credentials — Check
DB_PASSWORDin.envmatches what MySQL expects. - Port 8080 already in use — Another process is using port 8080.
Debug:
make logs-app # check PHP app logs
docker compose ps # check container status
RAG API shows "not ready"¶
Possible causes:
- First run — downloading the embedding model — The RAG API downloads a ~200 MB model on first start. This can take up to 60 seconds. Wait and check again.
- Qdrant not healthy — The RAG API depends on Qdrant. Check Qdrant first.
Debug:
make logs-rag-api # check RAG API logs
curl http://localhost:6333/healthz # check Qdrant directly
LLM Sidecar shows "not ready"¶
Possible causes:
- Empty
llm-sidecar/directory — See above. - Build failed — Check the build logs.
Debug:
make logs-llm-sidecar
docker compose logs llm-sidecar --tail=50
MySQL connection refused¶
Possible causes:
- Container still initializing — MySQL takes up to 30 seconds on first start (runs init SQL scripts).
- Password mismatch —
DB_PASSWORDin.envmust matchMYSQL_ROOT_PASSWORD(they're the same variable indocker-compose.yml). - Port conflict — Another MySQL instance is using port 3306.
Debug:
make logs-mysql
docker compose exec mysql mysqladmin ping -h localhost
Fix for port conflict:
Change the port in .env:
DB_PORT=3307
Then restart: make down && make up. Remember to also update any host-side tools that connect on 3306.
Port Conflicts¶
If a port is already in use, you'll see errors like Bind for 0.0.0.0:8080 failed: port is already allocated.
Find what's using the port¶
# macOS
lsof -i :8080
# Linux
ss -tlnp | grep 8080
Change the port¶
The easiest fix is to stop whatever is using the port. If you can't, you can change the mapping in docker-compose.yml:
# Change the left side (host port) only
ports:
- "9080:8080" # now accessible at localhost:9080
Common ports used by Intelis Insights:
| Port | Service | Alternative |
|---|---|---|
| 8080 | PHP App | Change to 9080, 8081, etc. |
| 3306 | MySQL | Change DB_PORT in .env |
| 6333 | Qdrant | Edit docker-compose.yml |
| 8089 | RAG API | Edit docker-compose.yml |
| 3100 | LLM Sidecar | Edit docker-compose.yml |
Chat / Query Issues¶
Chat returns "Unable to generate SQL"¶
Possible causes:
- No InteLIS data — The query database is empty or not connected. See Connecting InteLIS Data.
- RAG index is empty — Run
make rag-refreshto seed the index. - Question is too vague — Try a more specific question like "How many viral load tests were done last month?".
Chat returns "This question asks for restricted patient-level data"¶
This is intentional. The system blocks questions that ask for individual patient data (names, IDs, phone numbers). This is a privacy safeguard. Rephrase your question to ask for aggregated data instead.
Blocked: "Show me patient names with high viral load" Allowed: "How many patients have unsuppressed viral load by district?"
LLM API key rejected / "Unauthorized"¶
Possible causes:
- Invalid API key — Double-check the key in Settings → API Keys (or
.env). Make sure there are no extra spaces. - Wrong provider — If you set
LLM_DEFAULT_MODEL=sonnetbut only have an OpenAI key, it won't work. Either change the model or add an Anthropic key. - Expired key — Check your provider dashboard for key status.
Debug:
# Test the sidecar directly
curl http://localhost:3100/v1/models \
-H "Authorization: Bearer $LLM_SIDECAR_SECRET"
Settings page says "Keys saved" but chat still fails¶
Cause: The keys were saved to the database but the sidecar didn't receive them (e.g., the sidecar was restarting or unreachable at the time).
Fix: Open Settings → API Keys and click Save again. The app re-pushes all stored keys to the sidecar on every save and every page load. If the sidecar is healthy, the keys will take effect immediately.
You can verify the sidecar received the keys:
curl http://localhost:3100/health
Check the providers object — each configured provider should show true.
RAG search returns irrelevant results¶
Possible causes:
- Stale index — The schema or business rules changed since last seeding.
- Index corrupted — Rare, but possible.
Fix:
make rag-reset # full reset + re-seed
Docker Issues¶
"no space left on device"¶
Docker images and volumes can accumulate over time.
Fix:
# Remove unused Docker data
docker system prune -a
# Or just remove Intelis Insights data
make clean
Container keeps restarting¶
Debug:
docker compose ps # check status
docker compose logs <service> --tail=100 # check logs
Common causes:
- Health check failing — The service starts but the health endpoint returns errors.
- Missing dependency — A service that this one depends on isn't healthy.
- Configuration error — Check
.envfor typos.
Getting More Help¶
If you're stuck:
- Check the logs:
make logsormake logs-<service> - Check container status:
docker compose ps - Check health endpoints individually (see First-Run Checklist)
- Open an issue on GitHub