Troubleshooting
Quick Diagnosis
# Check container status
docker ps | grep aggregate
# Check recent logs
docker logs aggregate-time-windows --tail 50 2>&1 | grep -i error
# Test with sample data
curl -X POST http://localhost:8080/sensors \
-H "Content-Type: application/json" \
-d '{"sensor_id": "temp-001", "temperature": 72, "timestamp": "'$(date -u +%Y-%m-%dT%H:%M:%SZ)'"}'
Common Issues
Windows not closing / no output
Cause: Not enough data or timestamp field not recognized
Fix: Check timestamp field name and ensure window period is short enough for testing:
window:
tumbling:
size: 1m # Short for testing
timestamp_field: timestamp
Aggregates are wrong
Cause: Data arriving out of order or timestamps in wrong timezone
Fix: Add allowed lateness and normalize timestamps:
window:
tumbling:
size: 5m
allowed_lateness: 30s
- mapping: |
root.timestamp = this.timestamp.ts_parse("2006-01-02T15:04:05Z07:00").ts_format("2006-01-02T15:04:05Z")
Memory growing over time
Cause: Window state not being cleaned up
docker stats aggregate-time-windows --no-stream
Fix: Add window expiry and limit group cardinality:
window:
tumbling:
size: 5m
expiry: 1h # Clean up old state
Late data being dropped
Cause: allowed_lateness too short
Fix: Increase allowed lateness:
window:
tumbling:
size: 5m
allowed_lateness: 5m # Increase from default
Still stuck?
- Add debug logging:
logger: {level: DEBUG} - Check the Complete Pipeline for reference config
- Review Deduplicate Events for handling duplicates