Shipper Troubleshooting
Common issues and solutions for the Nadi Shipper agent.
Diagnostic Commands
Check Version
shipper --versionValidate Configuration
shipper --config /path/to/nadi.yaml --validateTest Connection
shipper --config /path/to/nadi.yaml --testCheck Status
shipper --config /path/to/nadi.yaml --statusVerbose Mode
shipper --config /path/to/nadi.yaml --record --verboseCommon Issues
Logs Not Being Sent
1. Check Log Files Exist
ls -la /var/log/nadi/Expected: Files like nadi-2024-01-15.log
If empty:
- Verify your SDK is writing logs
- Check SDK's
storage_pathmatches Shipper'sstorage
2. Check Shipper is Running
# systemd
systemctl status shipper
# supervisord
supervisorctl status shipper
# Process check
ps aux | grep shipper3. Check Configuration
shipper --config /path/to/nadi.yaml --validate4. Check Tracker File
cat /var/log/nadi/tracker.jsonThe tracker shows what's been processed.
Permission Errors
"Permission denied" Reading Logs
# Check file permissions
ls -la /var/log/nadi/
# Fix permissions
sudo chown shipper:shipper /var/log/nadi
sudo chmod 755 /var/log/nadi"Permission denied" Writing Tracker
# Shipper user needs write access
sudo chown shipper:shipper /var/log/nadiSELinux Issues (RHEL/CentOS)
# Check SELinux status
getenforce
# Temporarily disable
sudo setenforce 0
# Permanent fix
sudo semanage fcontext -a -t var_log_t "/var/log/nadi(/.*)?"
sudo restorecon -Rv /var/log/nadiConnection Errors
"Connection refused"
Check network connectivity:
bashcurl -I https://nadi.pro/api/healthCheck firewall:
bash# Allow outbound HTTPS sudo ufw allow out 443/tcpCheck proxy settings:
bashecho $HTTP_PROXY echo $HTTPS_PROXY
"Connection timeout"
Increase timeout in configuration:
nadi:
timeout: 2m # Increase from default 1m"SSL certificate error"
# Update CA certificates
sudo apt-get update && sudo apt-get install ca-certificates
# Or (CentOS)
sudo yum update ca-certificatesAuthentication Errors
"Invalid API Key"
Verify API key in configuration:
yamlnadi: apiKey: your-api-keyCheck for whitespace/formatting issues
Regenerate API key in Nadi dashboard
Test directly:
bashcurl -H "Authorization: Bearer YOUR_API_KEY" \ https://nadi.pro/api/health
"Application Not Found"
Verify application key:
yamlnadi: token: your-app-keyCheck application exists in Nadi dashboard
Ensure app key matches the application
Storage Path Issues
"Storage path not found"
# Create directory
sudo mkdir -p /var/log/nadi
# Set ownership
sudo chown www-data:www-data /var/log/nadi"No logs found in storage"
Check SDK configuration matches:
php// Laravel config/nadi.php 'storage_path' => '/var/log/nadi',Verify SDK is writing:
bash# Trigger a test error, then check ls -la /var/log/nadi/
Memory Issues
High Memory Usage
Reduce batch size:
nadi:
batchSize: 50 # Reduce from default 100Out of Memory
Check for stuck processes:
bashps aux | grep shipperRestart with limits:
ini# systemd [Service] MemoryLimit=100M
Duplicate Events
If you're seeing duplicate events:
Check tracker file:
bashcat /var/log/nadi/tracker.jsonReset tracker:
bashrm /var/log/nadi/tracker.jsonWARNING
This will re-send all existing logs
Clear old logs first:
bashrm /var/log/nadi/nadi-*.log rm /var/log/nadi/tracker.json
Service Won't Start
systemd
# Check status
systemctl status shipper
# Check logs
journalctl -u shipper -n 50
# Common fixes
sudo systemctl daemon-reload
sudo systemctl restart shippersupervisord
# Check status
supervisorctl status shipper
# Check logs
tail -f /var/log/shipper.log
# Restart
supervisorctl restart shipperLog Analysis
Check Shipper Logs
# systemd
journalctl -u shipper -f
# supervisord
tail -f /var/log/shipper.log
# Manual
tail -f /var/log/shipper.logCommon Log Messages
| Message | Meaning | Action |
|---|---|---|
Starting shipper... | Normal startup | None |
Connected to Nadi | Connection successful | None |
Batch sent: 100 events | Events delivered | None |
Retry attempt 1/3 | Temporary network issue | Wait |
Authentication failed | Bad credentials | Check keys |
Storage path not accessible | Permission issue | Fix permissions |
Enable Debug Logging
nadi:
logLevel: debug
verbose: trueOr via command line:
shipper --record --verbosePerformance Issues
Slow Delivery
Increase batch size:
yamlnadi: batchSize: 200Decrease flush interval:
yamlnadi: flushInterval: 5sEnable compression:
yamlnadi: compress: true
High CPU Usage
Increase flush interval:
yamlnadi: flushInterval: 30sReduce verbose logging:
yamlnadi: logLevel: warn verbose: false
Getting Help
If you're still having issues:
Collect diagnostics:
bashshipper --version shipper --config /path/to/nadi.yaml --validate shipper --config /path/to/nadi.yaml --test ls -la /var/log/nadi/ cat /var/log/nadi/tracker.jsonCheck logs:
bashjournalctl -u shipper -n 100Contact support: Email [email protected] with:
- OS and version
- Shipper version
- Configuration (redact keys)
- Error messages
- Log output