Troubleshooting
Common Issues
Services Not Starting
# Check service status
docker compose ps
# Check logs
docker compose logs <service-name> --tail 100
# Restart service
docker compose restart <service-name>
OpenSearch Issues
# Check cluster health
curl -sk -u admin:MyStrong@OpenSearch2026! \
https://localhost:9200/_cluster/health?pretty
# Check indices
curl -sk -u admin:MyStrong@OpenSearch2026! \
https://localhost:9200/_cat/indices?v
# Check logs
docker logs opensearch --tail 100
Backend Issues
# Check health
curl http://localhost:8081/healthz
# Check logs
docker logs clm-backend --tail 100
# Check Keycloak connection
curl http://localhost:8080/realms/log-monitoring/.well-known/openid-configuration
Frontend Issues
# Check if running
curl http://localhost:8085
# Check logs
docker logs clm-frontend --tail 100
# Rebuild
docker compose build --no-cache frontend
docker compose up -d frontend
Wazuh Issues
# Check manager status
docker exec wazuh-manager pgrep wazuh-analysisd
# Check alerts
docker exec wazuh-manager tail -f /var/ossec/logs/alerts/alerts.json
# Check agent status
curl -sk -u admin:MyStrong@OpenSearch2026! \
https://localhost:55000/agents
RabbitMQ Issues
# Check status
docker exec rabbitmq rabbitmq-diagnostics check_port_connectivity
# Check queues
docker exec rabbitmq rabbitmqctl list_queues
# Check logs
docker logs rabbitmq --tail 100
Performance Issues
High Memory Usage
# Check container stats
docker stats
# Limit memory in docker-compose.yml
mem_limit: 512m
High CPU Usage
# Check container CPU
docker stats --format "table {{.Name}}\t{{.CPUPerc}}"
# Limit CPU in docker-compose.yml
cpus: "0.50"
Disk Space
# Check disk usage
df -h
# Clean up Docker
docker system prune -a
# Clean up volumes
docker volume prune
Network Issues
Connectivity
# Test OpenSearch
curl -sk https://localhost:9200
# Test Keycloak
curl http://localhost:8080
# Test Backend
curl http://localhost:8081/healthz
DNS Resolution
# Test Docker DNS
docker exec clm-backend nslookup opensearch
# Test port connectivity
docker exec clm-backend nc -zv opensearch 9200
Log Analysis
Search Logs
# Search OpenSearch logs
curl -sk -u admin:MyStrong@OpenSearch2026! \
https://localhost:9200/logs-*/_search \
-H 'Content-Type: application/json' \
-d '{
"query": {
"bool": {
"must": [
{ "match": { "message": "error" } }
],
"filter": [
{ "range": { "@timestamp": { "gte": "now-1h" } } }
]
}
},
"size": 10
}'
Export Logs
# Export logs to file
curl -sk -u admin:MyStrong@OpenSearch2026! \
"https://localhost:9200/logs-*/_search?size=1000" \
-H 'Content-Type: application/json' \
-d '{"query": {"match_all": {}}}' \
> logs-export.json
Recovery
Restart All Services
docker compose down
docker compose up -d
Restore from Backup
# Restore OpenSearch snapshot
curl -sk -u admin:MyStrong@OpenSearch2026! \
https://localhost:9200/_snapshot/my_backup/snapshot_1/_restore
Reset Database
# Drop and recreate database
docker exec postgres psql -U admin -d clm_logs -c "DROP SCHEMA public CASCADE; CREATE SCHEMA public;"
Next Steps
- CI/CD - Jenkins pipeline
- Kubernetes - K3s deployment
- Local Setup - Development setup