Troubleshooting
Common issues, diagnostic commands, and log locations for Baander operators.
Diagnostic Commands
Start here. These commands help you understand the current state of the system.
# Check PHP and Symfony versions
make info
# Verify all components are healthy (database, Redis, FFmpeg, Swoole)
make exec cmd="php bin/console app:health:check"
# Validate configuration for common mistakes
make exec cmd="php bin/console app:config:validate"
See the full documentation for these commands:
Log Locations
Makefile shortcuts
| Command | Description |
|---|---|
make logs |
Follow app container logs (Ctrl+C to exit) |
make logs-nginx |
Follow Nginx container logs |
make hl-logs |
Last 1 hour of app logs, highlighted (requires hl) |
make hl-logs-f |
Follow app logs, highlighted |
make hl-logs-nginx |
Last 1 hour of Nginx logs, highlighted |
make hl-logs-all |
Last 1 hour of all containers, highlighted |
make hl-logs-error |
Last 1 hour of app error-level logs only |
make hl-logs-warn |
Last 1 hour of app warnings and above |
Container names
| Container | Name |
|---|---|
| Application (Swoole) | baander-app |
| Reverse proxy | baander-nginx |
| Database | baander-postgres |
| Cache / sessions / jobs | baander-redis |
| Profiler (dev only) | baander-profiler |
Docker commands
# Follow logs for a specific container
docker logs -f baander-app
# Last 100 lines
docker logs --tail 100 baander-app
# Logs since a specific time
docker logs --since 2026-04-21T10:00:00 baander-app
# All containers at once
docker compose logs --tail 50
# Check if all containers are running
docker compose ps
Common Issues
Redis unreachable
Symptoms: Sessions fail, rate limiting stops working, messenger jobs do not process, cache misses on every request.
Cause: The REDIS_PASSWORD in .env does not match the password configured in docker-compose.yml for the Redis container.
Fix:
-
Verify the password in
.env:grep REDIS_PASSWORD .env -
Verify the password in
docker-compose.yml(check the Redis servicecommandandenvironmentsections):grep -A2 'requirepass\|REDIS_PASSWORD' docker-compose.yml -
Ensure both match, then restart:
make restart -
Confirm Redis is reachable from the app container:
make exec cmd="php bin/console app:health:check" -
Verify the internal Docker network exists:
docker network ls | grep baander-backtierIf missing, recreate it by running
make down && make start.
Transcoding failures
Symptoms: Video playback fails, transcode jobs stuck in pending or failed state, missing quality tiers.
Fix:
-
Verify FFmpeg is available in the container:
make exec cmd="ffmpeg -version"If FFmpeg is not found, build the FFmpeg image first:
make build-ffmpeg make build -
Check the job monitor for failed transcode jobs:
make exec cmd="php bin/console app:health:check" -
Review app logs for transcode errors:
make hl-logs-error -
If the CPU process pool is failing, check for memory issues or worker crashes in the logs:
docker logs --tail 200 baander-app | grep -i "process\|pool\|transcode"
Permission errors
Symptoms: File upload failures, media files not accessible, "permission denied" errors in logs.
Cause: File ownership mismatch between the host user and the container process.
Fix:
-
Check volume mount permissions inside the container:
make exec cmd="ls -la /storage" -
The Makefile passes
HOST_UIDandHOST_GIDto the container. Verify these match the host user:id -u id -g -
If ownership is wrong, fix it on the host (adjust paths as needed):
sudo chown -R $(id -u):$(id -g) ./storage ./config -
Restart the app to pick up corrected ownership:
make restart
Swoole crashes
Symptoms: The application becomes unresponsive, returns 502 errors, or the container restarts repeatedly.
Fix:
-
Check container restart count and status:
docker compose ps docker inspect baander-app --format='{{.RestartCount}}' -
Check logs for crash details:
docker logs --tail 500 baander-app -
If workers are running out of memory, increase the memory limit or reduce
SWOOLE_WORKER_NUMin your Swoole configuration. -
If crashes happen under load, check the Swoole configuration in
config/packages/swoole.yamland consider reducing worker count or enabling coroutine hooks more selectively.
Database connection refused
Symptoms: All page loads fail, "connection refused" or "could not connect to server" errors.
Fix:
-
Verify the database container is running:
docker compose psIf it is not running:
make start -
Check
DATABASE_URLin.env:grep DATABASE_URL .envEnsure the host is
database(the Docker service name, notlocalhost):DATABASE_URL="postgresql://baander:your_password@database:5432/baander?serverVersion=18&charset=utf8" -
Test connectivity from the app container:
make exec cmd="php bin/console dbal:run-sql 'SELECT 1'" -
Check PostgreSQL logs if the connection is refused:
docker logs --tail 100 baander-postgres
OAuth token issues
Symptoms: Users cannot authenticate, access tokens rejected, refresh token flow fails.
Fix:
-
Verify
APP_SECRETis set to a strong value (not the default):grep APP_SECRET .env -
Check that OAuth encryption keys exist and are readable:
make exec cmd="ls -la config/secrets/oauth/" -
If keys were rotated recently, ensure the encryption key in
.envmatches the new key pair. See security.md for the rotation procedure. -
If tokens are failing after a deployment, the encryption key may have changed between workers. Ensure
APP_ENV=prodand that the encryption key is consistent across all workers. -
Rotate keys if you suspect compromise:
make exec cmd="php bin/console app:auth:rotate-secrets"
Media not appearing after scan
Symptoms: Library scan completes but songs, movies, or other media do not show up in the catalog.
Fix:
-
Verify the library path is accessible inside the container:
make exec cmd="ls -la /path/to/your/media"Replace
/path/to/your/mediawith the library path configured in your library settings. If the path does not exist or is empty inside the container, the volume mount indocker-compose.ymlis incorrect. -
Re-run the scan:
make exec cmd="php bin/console app:library:scan" -
Check scan logs for errors:
make hl-logs-error | grep -i "scan\|library" -
If metadata enrichment is failing (covers, artist info), check that external API keys are configured in
.envand that the container has outbound internet access:make exec cmd="curl -s -o /dev/null -w '%{http_code}' https://api.discogs.com"
Getting Help
If you encounter an issue not covered here:
- Run the diagnostic commands above and collect the relevant logs.
- Search existing issues on GitHub.
- Open a new issue with the diagnostic output, logs, and steps to reproduce.
See Also
- monitoring.md -- ongoing observability and alerting
- security.md -- secret rotation and breach recovery
- app:health:check -- component health verification
- app:config:validate -- configuration audit