Common Issues & Playbooks
A guide to diagnosing and resolving common operational issues encountered during local development.
1. Port 5432 / 7687 / 6379 Already in Use
Symptom:
docker compose up fails with:
Bind for 0.0.0.0:5432 failed: port is already allocated
Solution:
You may have a host-native PostgreSQL, Neo4j, or Redis service running locally.
- On macOS: Stop local services via
brew services stop postgresqlorbrew services stop redis. - Or update port bindings in
.envto map to alternative host ports (e.g.DATABASE_URL=postgresql://ai_friend:ai_friend@127.0.0.1:5433/ai_friend).
2. Ollama Model Not Found / Connection Refused
Symptom:
brain_agent logs: Cannot connect to Ollama at http://host.docker.internal:11434
Solution:
- Ensure Ollama is running on the host:
ollama serve. - Confirm the model has been pulled:
ollama pull llama3.2:3b. - If running Linux, ensure
OLLAMA_BASE_URLin.envis set tohttp://172.17.0.1:11434(host gateway) instead ofhost.docker.internal.
3. Reference Voice Sample Missing / Healthcheck Fail
Symptom:
local_voice container stays in (unhealthy) state and voice_agent does not start.
Solution:
- AI Friend boots automatically with a default voice sample if missing. Ensure
assets/voice/default_voice.wavexists. - Run
python backend/scripts/ensure_default_voice_sample.pyto re-seed the reference audio. - Restart
local_voice:docker compose -f docker-compose.infra.yml restart local_voice.
4. Microphone Input Permissions (macOS)
Symptom:
scripts/audio/record_voice.py records silence or throws PortAudioError: Permission Denied.
Solution:
- Open System Settings Privacy & Security Microphone.
- Ensure Terminal, iTerm2, or VS Code has microphone access enabled.