Overview
This guide covers common operational issues, diagnostic procedures, and solutions for the StreamLine Logistics platform. Issues are organized by service and component type.Service Startup Issues
Services fail to start with 'Connection refused' errors
Services fail to start with 'Connection refused' errors
Symptoms: Services crash on startup with connection errors to Eureka or databases.Diagnosis:Common Causes:
- Eureka Server not ready: Services try to register before Eureka is available.
depends_on configured, but this only waits for container start, not service readiness. Increase retry attempts:- Database not ready: Service starts before database is accepting connections.
- Network issues: Containers can’t communicate on the bridge network.
Services registered with Eureka but showing as DOWN
Services registered with Eureka but showing as DOWN
Symptoms: Eureka dashboard shows services registered but status is DOWN.Diagnosis:Solution:If this returns DOWN, check component health:
- Health endpoint failing: Check actuator health:
- Database connection issues: Verify database connectivity:
- Incorrect Eureka configuration: Verify application.yml:
Port already in use errors
Port already in use errors
Symptoms: Container fails to start with “port is already allocated” error.Diagnosis:Solution:
- Stop conflicting service:
- Change port mapping in docker-compose.yml:
- Stop old containers:
Database Issues
Database connection pool exhausted
Database connection pool exhausted
Symptoms: Services log “HikariPool - Connection is not available” errors.Diagnosis:Solution:
- Increase pool size in application.yml:
- Check for connection leaks:
- Restart service to reset connections:
Data not persisting after container restart
Data not persisting after container restart
Symptoms: Database data is lost when containers are stopped/restarted.Diagnosis:Solution:
- Verify volume mounts in docker-compose.yml:
- Check if volume was removed:
- Restore from backup:
Hibernate DDL errors on startup
Hibernate DDL errors on startup
Symptoms: Services fail to start with “Table already exists” or schema validation errors.Diagnosis:Solution:Options:
- DDL-auto set to ‘create’: This drops and recreates tables on every restart.
create: Drop and recreate (development only)create-drop: Create on start, drop on stop (testing)update: Update schema if needed (development)validate: Only validate, don’t modify (production)none: Do nothing (production with migration tools)
- Manual schema reset:
MongoDB authentication failed
MongoDB authentication failed
Symptoms: Tracking service can’t connect to MongoDB with authentication errors.Diagnosis:Solution:Note: The configuration uses
- Verify connection string in application.yml:
localhost but should use tracking_db inside Docker network.- Update to correct hostname:
- Reset MongoDB authentication:
Service Communication Issues
OpenFeign client calls failing
OpenFeign client calls failing
Symptoms: Order service can’t communicate with Inventory or Tracking services via Feign.Diagnosis:Common Causes:
-
Service not registered with Eureka: Verify
@EnableEurekaClientannotation and configuration. - Incorrect Feign client name:
- Circuit breaker opened: If using Resilience4j, circuit may be open after failures.
- Network timeout:
API Gateway routing errors
API Gateway routing errors
Symptoms: Requests through API Gateway (port 8080) fail with 404 or 503 errors.Diagnosis:Solution:
- Verify route configuration: Check gateway application properties/yml for route definitions.
- Service not discovered: Gateway may not be finding services in Eureka:
- Test service directly to isolate gateway issues:
Performance Issues
Slow response times and timeouts
Slow response times and timeouts
Symptoms: API requests taking too long or timing out.Diagnosis:Solution:
- Database query optimization:
- Add database indexes:
- Increase JVM heap size:
- Enable query caching:
Memory leaks and OutOfMemoryError
Memory leaks and OutOfMemoryError
Symptoms: Service gradually consumes more memory, eventually crashes with OOM error.Diagnosis:Solution:
- Enable heap dump on OOM:
- Increase memory limits in docker-compose.yml:
- Check for connection leaks:
- Restart service temporarily:
Data Consistency Issues
Stock not updating correctly
Stock not updating correctly
Symptoms: Inventory shows incorrect quantities or allows overselling.Diagnosis:Solution:
- Implement pessimistic locking:
- Use transactions:
- Check reserved quantity logic:
Order status not synchronized with tracking
Order status not synchronized with tracking
Symptoms: Order shows SHIPPED but tracking shows no events, or vice versa.Diagnosis:Solution:
- Verify Feign call succeeded:
- Implement eventual consistency with retry logic:
- Add compensation logic for failures:
Container and Docker Issues
Docker Compose commands hanging or timing out
Docker Compose commands hanging or timing out
Symptoms: Solution:
docker-compose up or docker-compose down hangs indefinitely.Diagnosis:- Force stop containers:
- Restart Docker daemon:
- Clean up Docker resources:
Image build failures
Image build failures
Symptoms: Solution:
docker-compose build fails with compilation or build errors.Diagnosis:- Clear Docker build cache:
- Build locally first to isolate issues:
- Check Maven/Gradle dependencies:
- Verify Dockerfile base image:
Quick Diagnostic Commands
Full System Health Check
Emergency Restart Procedure
Getting Help
If issues persist after troubleshooting:- Collect diagnostic information:
- Check application logs for stack traces and error messages
- Review recent changes to code, configuration, or infrastructure
- Test in isolation by running services individually to identify the problematic component