Services Not Starting
Checking Service Status
View the status of all services:Up status. Services that failed to start show Exit or Restarting.
Viewing Service Logs
Check logs for a specific service:View Logstash Logs
The Makefile includes a shortcut for viewing Logstash logs:docker compose logs -f logstash.
Service Dependencies
If KrakenD fails to start, check its dependencies:- fake_api must be running (KrakenD backends)
- jaeger must be running (tracing exporter)
- krakend_ce must be running first
Port Conflicts
Identifying Port Conflicts
If you see errors likebind: address already in use, another service is using the same port.
Common conflicting ports:
8080- KrakenD (may conflict with other web services)3000- Demo web app (may conflict with other Node.js apps)5601- Kibana9200- Elasticsearch (mapped to19200to avoid conflicts)
Finding What’s Using a Port
On Linux/macOS:Resolving Port Conflicts
Option 1: Stop the conflicting service Option 2: Change the host port indocker-compose.yml
For example, to change KrakenD from port 8080 to 8081:
Configuration Errors
Invalid KrakenD Configuration
If KrakenD fails to start due to configuration errors, check the logs:Validating KrakenD Configuration
Manually validate yourconfig/krakend/krakend.json:
Validating Flexible Configuration
If you’re using the flexible configuration template (krakend-flexible-config.tmpl):
config/krakend/krakend-flexible-config.compiled.json.
The command runs:
Configuration Not Reloading
The KrakenD playground uses the watch image variant that automatically reloads configuration changes. If changes aren’t being picked up:- Verify you’re editing the correct file:
config/krakend/krakend.json - Check the file is valid JSON (use a JSON validator)
- Watch the KrakenD logs for reload events:
docker compose logs -f krakend_ce - If still not working, manually restart:
make restart
Service Management Commands
Restart All Services
Restart all services without removing volumes:docker compose restart.
Restart Single Service
Restart a specific service:Completely Reset Environment
Stop all services and remove volumes:docker compose down --volumes, which:
- Stops all containers
- Removes all containers
- Removes all volumes (clears all data)
Rebuild Services
If you’ve modified Dockerfiles or need to rebuild images:docker compose build web && docker compose up -d, which rebuilds the web app and starts all services.
To rebuild everything:
Common Service Issues
Elasticsearch Won’t Start
Symptom: Elasticsearch exits immediately or shows OOM errors. Cause: Insufficient memory or vm.max_map_count too low. Solution:- Increase Docker memory: Ensure Docker has at least 4GB RAM allocated
-
Increase vm.max_map_count (Linux/macOS):
-
Check Elasticsearch logs:
Grafana Shows “Origin Not Allowed”
Cause: CORS configuration issue. Solution: Access Grafana at the correct URL: http://localhost:4000RabbitMQ Management UI Not Accessible
Cause: RabbitMQ may still be initializing. Solution:- Wait 30 seconds after starting
- Access http://localhost:15672
- Default credentials:
guest/guest
Keycloak Realm Not Found
Symptom: Keycloak starts but thekrakend realm is missing.
Cause: Realm import failed or volume mount incorrect.
Solution:
- Check volume mount:
./config/keycloak/realms:/opt/keycloak/data/import - Verify import files exist:
ls config/keycloak/realms/ - Check Keycloak logs:
docker compose logs keycloak - Ensure the command includes:
--import-realm
JWT Revoker Constantly Restarting
Symptom:jwt_revoke service shows Restarting status.
Cause: Cannot connect to KrakenD.
Solution:
- Ensure KrakenD is running:
docker compose ps krakend_ce - Check JWT revoker logs:
docker compose logs jwt_revoke - Verify KrakenD is accessible from containers:
docker compose exec jwt_revoke wget -O- http://krakend_ce:8080/__health
Network Issues
Cannot Access Services from Host
Symptom:curl http://localhost:8080 fails.
Cause: Services not exposing ports correctly.
Solution:
- Check services are running:
docker compose ps - Verify port mappings in
docker-compose.yml - Check firewall/security software isn’t blocking ports
- On Windows/macOS, ensure Docker Desktop is running
Services Cannot Communicate
Symptom: Backend connection errors in KrakenD logs. Cause: Docker network issue. Solution:- Services should use service names as hostnames (e.g.,
http://fake_api:80) - Restart Docker Compose network:
Performance Issues
Services Running Slowly
Cause: Insufficient resources allocated to Docker. Solution:- Check Docker resource limits: Docker Desktop > Settings > Resources
- Recommended minimums:
- Memory: 4GB
- CPU: 2 cores
- Swap: 1GB
- Disable unused services to reduce resource usage
High CPU Usage
Cause: Elasticsearch or Logstash may be indexing heavily. Solution:- Reduce logging verbosity in KrakenD
- Increase Elasticsearch heap size if you have more RAM:
Data and Volume Issues
Persistent Data Not Saving
Cause: No named volumes defined for persistence. Solution: The playground is designed for development and doesn’t persist data by default. Usemake stop only when you want to clear all data.
Disk Space Issues
Symptom: Services fail with “no space left on device”. Solution:- Clean up Docker resources:
- Remove old playground volumes:
Getting Help
Enable Debug Logging
Editconfig/krakend/krakend.json to enable debug mode:
Capture Full Diagnostic Information
Collect comprehensive diagnostic data:Community Support
If you’re still stuck:- KrakenD Support: https://www.krakend.io/support/
- Playground Issues: https://github.com/krakend/playground-community/issues
- Documentation: https://www.krakend.io/docs/
- What you were trying to do
- What you expected to happen
- What actually happened
- Relevant log excerpts