Startup
Purpose: Resolve common startup and initialization issues.
Contents - Container Startup Issues - Database Connection Problems - Application Initialization - Configuration Issues - Sources
Container Startup Issues¶
Symptom: Containers fail to start or exit immediately
Issue | Symptom | Cause | Solution | Source |
---|---|---|---|---|
Container exits with code 125 | docker ps shows no containers |
Invalid configuration or missing image | Check docker-compose.yml syntax, verify image availability | "Docker Troubleshooting" — https://docs.docker.com/engine/reference/run/ — retrieved 2025-01-09 |
Port binding errors | port already in use error |
Another service using same port | Stop conflicting service or change port mapping | "Docker Troubleshooting" — https://docs.docker.com/engine/reference/run/ — retrieved 2025-01-09 |
Volume mount failures | Permission denied errors | Incorrect file permissions | Fix file ownership: sudo chown -R 1000:1000 ./data |
"Docker Troubleshooting" — https://docs.docker.com/engine/reference/run/ — retrieved 2025-01-09 |
Memory/CPU limits | Container killed (OOMKilled) | Insufficient resources | Increase memory limits or optimize application | "Docker Troubleshooting" — https://docs.docker.com/engine/reference/run/ — retrieved 2025-01-09 |
Diagnostic Commands:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
|
Common Startup Fixes:
1 2 3 4 5 6 7 8 9 10 11 |
|
Database Connection Problems¶
Symptom: Application fails to connect to database
Issue | Error Message | Diagnosis | Solution | Source |
---|---|---|---|---|
Database not ready | Connection refused |
Database container not started | Wait for database health check or restart database | "Firefly III Installation" — https://docs.firefly-iii.org/how-to/firefly-iii/installation/self-hosted/ — retrieved 2025-01-09 |
Wrong credentials | Access denied |
Incorrect username/password | Verify DB_USERNAME and DB_PASSWORD in .env | "Firefly III Installation" — https://docs.firefly-iii.org/how-to/firefly-iii/installation/self-hosted/ — retrieved 2025-01-09 |
Database doesn't exist | Unknown database |
Database not created | Check MARIADB_DATABASE environment variable | "Firefly III Installation" — https://docs.firefly-iii.org/how-to/firefly-iii/installation/self-hosted/ — retrieved 2025-01-09 |
Character set issues | Incorrect string value |
Wrong character set | Ensure utf8mb4 character set in database | "Firefly III Installation" — https://docs.firefly-iii.org/how-to/firefly-iii/installation/self-hosted/ — retrieved 2025-01-09 |
Database Diagnostic Commands:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
|
Database Connection Fixes:
1 2 3 4 5 6 7 8 9 10 11 |
|
Application Initialization¶
Symptom: Application starts but fails during initialization
Issue | Log Message | Cause | Solution | Source |
---|---|---|---|---|
Missing APP_KEY | No application encryption key |
APP_KEY not set | Generate: docker exec app php artisan key:generate |
"Firefly III Configuration" — https://docs.firefly-iii.org/how-to/firefly-iii/installation/self-hosted/ — retrieved 2025-01-09 |
Migration failures | Migration failed |
Database schema issues | Check database permissions and run migrations manually | "Firefly III Configuration" — https://docs.firefly-iii.org/how-to/firefly-iii/installation/self-hosted/ — retrieved 2025-01-09 |
Cache/config issues | Configuration cache errors |
Stale cache files | Clear cache: php artisan config:clear |
"Firefly III Configuration" — https://docs.firefly-iii.org/how-to/firefly-iii/installation/self-hosted/ — retrieved 2025-01-09 |
Permission errors | Permission denied |
File system permissions | Fix storage permissions: chown -R www-data:www-data storage |
"Firefly III Configuration" — https://docs.firefly-iii.org/how-to/firefly-iii/installation/self-hosted/ — retrieved 2025-01-09 |
Application Diagnostic Commands:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
|
Application Initialization Fixes:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
|
Configuration Issues¶
Symptom: Application starts but behaves incorrectly
Issue | Symptom | Common Cause | Solution | Source |
---|---|---|---|---|
Wrong base URL | Links point to localhost | APP_URL misconfigured | Set correct APP_URL in .env | "Firefly III Configuration" — https://docs.firefly-iii.org/how-to/firefly-iii/installation/self-hosted/ — retrieved 2025-01-09 |
Timezone issues | Wrong timestamps | APP_TIMEZONE not set | Set APP_TIMEZONE=Europe/Amsterdam | "Firefly III Configuration" — https://docs.firefly-iii.org/how-to/firefly-iii/installation/self-hosted/ — retrieved 2025-01-09 |
Email not working | No emails sent | MAIL_* variables wrong | Configure SMTP settings correctly | "Firefly III Configuration" — https://docs.firefly-iii.org/how-to/firefly-iii/installation/self-hosted/ — retrieved 2025-01-09 |
Cache not working | Slow performance | Redis connection failed | Check REDIS_HOST and REDIS_PORT | "Firefly III Configuration" — https://docs.firefly-iii.org/how-to/firefly-iii/installation/self-hosted/ — retrieved 2025-01-09 |
Configuration Validation:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 |
|
Startup Sequence Troubleshooting¶
Normal Startup Sequence: 1. Database container starts and initializes 2. Redis container starts 3. Application container starts 4. Database migrations run 5. Cache warming occurs 6. Nginx starts and serves traffic
Startup Timeline Issues:
Step | Timeout | Failure Mode | Debug Command |
---|---|---|---|
Database ready | 30s | Connection refused | docker logs firefly-iii-application.mariadb |
Redis ready | 5s | Connection refused | docker logs firefly-iii-application.redis |
Migrations | 60s | SQL errors | docker exec app php artisan migrate:status |
App startup | 90s | PHP errors | docker logs firefly-iii-application.application |
Health check | 60s | HTTP 503 | curl -v http://localhost:8080/health |
Startup Sequence Debug:
1 2 3 4 5 6 7 8 9 |
|
Quick Recovery Scripts¶
Full Stack Restart:
1 2 3 4 5 6 7 8 |
|
Database Reset (Development Only):
1 2 3 4 5 6 7 |
|
Sources¶
- "Firefly III Installation Guide" — https://docs.firefly-iii.org/how-to/firefly-iii/installation/self-hosted/ — retrieved 2025-01-09
- "Docker Troubleshooting Guide" — https://docs.docker.com/engine/reference/run/ — retrieved 2025-01-09