-
Notifications
You must be signed in to change notification settings - Fork 0
Troubleshooting
Real-world troubleshooting guide based on actual deployment scenarios and common issues encountered by users.
# Check all container status
docker compose ps
# View resource usage
docker stats --no-stream
# Check disk space
df -h
# Network connectivity test
docker exec gluetun ping 8.8.8.8Symptoms:
gluetun | ERROR [openvpn] authentication failed
gluetun | ERROR [firewall] cannot allow VPN connection
Solutions:
# 1. Verify credentials in .env
grep VPN_ .env
# 2. Test different server countries
VPN_SERVICE_PROVIDER=privatevpn
SERVER_COUNTRIES=Netherlands,Switzerland,Sweden
# 3. Try different protocol
OPENVPN_PROTOCOL=tcp # instead of udp
# 4. Check provider status
docker logs gluetun --tail 50Symptoms:
gluetun | INFO [openvpn] Initialization Sequence Completed
# But containers can't access internet
Solutions:
# 1. Check VPN IP assignment
docker exec gluetun wget -qO- https://ipinfo.io/ip
# 2. Test DNS resolution
docker exec gluetun nslookup google.com
# 3. Restart with fresh connection
docker compose restart gluetun
docker compose restart qbittorrent sonarr radarrProblem: Container shows testing mode even after script updates
keepalive-client | โ ๏ธ TESTING MODE: Simulating DNS leak - DNS location forced to US
keepalive-client | โ Failed to send keepalive to http://duevite.eu:5421
Root Cause: Container running older script version despite file updates.
Solution:
# Restart client container to reload script
docker compose restart keepalive-client
# Verify fix - should show normal operation:
docker compose logs -f keepalive-client
# Expected after fix:
# โ
Keepalive sent successfully at [timestamp]
# ๐ Location: Toruล, Kujawsko-Pomorskie, PL
# ๐ DNS: PL (WAW) - No leak detectedSymptoms:
keepalive-client | โ Failed to send keepalive to http://duevite.eu:5421
keepalive-client | ๐ Location: Unknown, Unknown, Unknown
Diagnostic Steps:
# 1. Test VPN connectivity from inside VPN network
docker exec keepalive-client curl -s https://ipinfo.io/json
# 2. Test keepalive server connectivity
docker exec keepalive-client curl -v http://duevite.eu:5421/status
# 3. Check if server is accessible from host
curl -s http://localhost:5421/status
# 4. Verify container network
docker network ls
docker network inspect vpn-media_monitoring-networkSymptoms: Cannot access web interfaces from browser
Solutions:
# 1. Check if containers are running
docker compose ps
# 2. Verify port mappings
docker compose config | grep -A5 ports
# 3. Test local access
curl -I http://localhost:9804 # Sonarr
curl -I http://localhost:9802 # qBittorrent
# 4. Check firewall
sudo ufw status # Ubuntu
sudo firewall-cmd --list-all # CentOS/RHEL
# 5. For Synology - check DSM firewall in Control PanelSymptoms:
Container xyz exited with code 1
Solutions:
# 1. Check detailed error logs
docker compose logs container-name
# 2. Check disk space
df -h
# 3. Check memory usage
free -h
# 4. Verify permissions
ls -la gluetun/ qbittorrent/config/
# 5. Reset container state
docker compose down
docker compose up -d container-nameCommon causes and fixes:
Permission Issues:
# Fix ownership
sudo chown -R $PUID_MEDIA:$PGID_MEDIA qbittorrent/config/
sudo chmod -R 755 qbittorrent/config/Port Conflicts:
# Check if port 9802 is in use
sudo netstat -tlnp | grep 9802
sudo lsof -i :9802
# Change external port in compose.yaml if neededConfig Corruption:
# Backup and reset config
mv qbittorrent/config/ qbittorrent/config.backup/
mkdir qbittorrent/config/
docker compose restart qbittorrentDiagnostic Steps:
# 1. Check server logs for Telegram activity
docker compose logs keepalive-server | grep -i telegram
# Expected patterns:
# โ
Telegram message sent successfully
# ๐ฅ Telegram command received: /status
# โ
Status response sentSolutions:
# 1. Verify bot token
curl "https://api.telegram.org/bot$TELEGRAM_BOT_TOKEN/getMe"
# 2. Test message sending
curl -X POST "https://api.telegram.org/bot$TELEGRAM_BOT_TOKEN/sendMessage" \
-d "chat_id=$TELEGRAM_CHAT_ID&text=Test message"
# 3. Restart bot polling
docker compose restart keepalive-server
# 4. Check network connectivity
docker exec keepalive-server curl -s https://api.telegram.orgCheck monitoring system:
# 1. Verify keepalive client is running
docker compose logs keepalive-client --tail 20
# 2. Check if client is successfully sending data
# Should see: โ
Keepalive sent successfully
# 3. Verify server receives data
docker compose logs keepalive-server | grep "Keepalive received"
# 4. Check alert thresholds
grep ALERT_THRESHOLD .envIdentify the cause:
# Check container resource usage
docker stats --no-stream
# Check system load
top
htop # if installedSolutions:
# 1. Limit download speeds in qBittorrent
# Go to qBittorrent WebUI โ Preferences โ Speed
# 2. Adjust check intervals
CHECK_INTERVAL_MINUTES=10 # Increase from 5 to 10
# 3. Reduce concurrent downloads
# Set max active torrents in qBittorrent
# 4. Monitor specific containers
docker stats qbittorrent sonarr radarrCheck memory consumption:
# System memory
free -h
# Container memory
docker stats --format "table {{.Name}}\t{{.CPUPerc}}\t{{.MemUsage}}"Solutions:
# 1. Add memory limits to compose.yaml
services:
qbittorrent:
mem_limit: 1g
sonarr:
mem_limit: 512m
# 2. Restart heavy containers periodically
# Add to crontab for weekly restart:
# 0 3 * * 0 cd /path/to/project && docker compose restart qbittorrentSolutions:
# 1. Ensure Docker package is latest version
# Package Center โ Docker โ Update
# 2. Check Docker service status
sudo systemctl status docker
# 3. Restart Docker service if needed
sudo systemctl restart docker
# 4. Verify Docker Compose version
docker compose versionSynology permissions fix:
# 1. Get correct user/group IDs
id admin # Usually 1026:100
# 2. Update .env file
PUID_MEDIA=1026
PGID_MEDIA=100
# 3. Fix existing permissions
sudo chown -R 1026:100 /volume1/docker/project/
sudo chmod -R 755 /volume1/docker/project/Common conflicting ports and solutions:
Port 5000 (DSM):
# Change keepalive server port in compose.yaml
keepalive-server:
ports:
- "5421:5000" # Use 5421 instead of 5000Port 5001 (DSM HTTPS):
# Avoid using 5001 for any services# Proper restart order
docker compose restart gluetun # VPN gateway first
sleep 10 # Wait for VPN connection
docker compose restart keepalive-client # Then monitoring
docker compose restart keepalive-server # Server can restart anytime
# Verify everything is working
docker compose ps
docker compose logs --tail=10 keepalive-client# Restart media stack (order doesn't matter)
docker compose restart qbittorrent prowlarr sonarr radarr readarr bazarr
# Or restart individually as needed
docker compose restart sonarr# Nuclear option - restart everything
docker compose down
docker compose up -d
# Or with fresh images
docker compose down
docker compose pull
docker compose up -dGluetun VPN:
gluetun | INFO [openvpn] Initialization Sequence Completed
gluetun | INFO [healthcheck] healthy!
gluetun | INFO [ip getter] Public IP address is 185.170.104.53 (Poland...)
Keepalive Client:
keepalive-client | โ
Keepalive sent successfully at [timestamp]
keepalive-client | ๐ Location: Toruล, Kujawsko-Pomorskie, PL
keepalive-client | ๐ DNS: PL (WAW) - No leak detected
Keepalive Server:
keepalive-server | Keepalive received from synology-vpn-media - IP: 185.170.104.53
keepalive-server | โ
Telegram message sent successfully
# 1. Verify VPN is working
docker exec gluetun wget -qO- https://ipinfo.io/ip
# 2. Test container communication
docker exec sonarr curl -s http://localhost:9696 # Prowlarr
docker exec qbittorrent curl -s http://localhost:9117 # Jackett
# 3. Check external access
curl -s http://localhost:9804 # Sonarr web interface# Check Docker networks
docker network ls
docker network inspect vpn-media_vpn-network
docker network inspect vpn-media_monitoring-network
# Check container networking
docker exec gluetun ip route
docker exec gluetun ip addr show# Search for errors across all containers
docker compose logs | grep -i error
docker compose logs | grep -i fail
docker compose logs | grep -i timeout
# Monitor logs in real-time
docker compose logs -f --tail=50
# Export logs for analysis
docker compose logs > safeharbor-logs-$(date +%Y%m%d).log# Monitor resource usage over time
while true; do
docker stats --no-stream --format "{{.Name}}: CPU {{.CPUPerc}} MEM {{.MemUsage}}"
sleep 30
done
# Check disk I/O
iostat -x 1 # If available- System Information:
# Platform details
uname -a
docker --version
docker compose version
# SafeHarbor version
git log --oneline -1 # If using git- Container Status:
docker compose ps
docker compose logs --tail=50 > logs.txt- Configuration (Sanitized):
# Remove sensitive data before sharing
cp .env .env.sanitized
sed -i 's/VPN_PASSWORD=.*/VPN_PASSWORD=REDACTED/' .env.sanitized
sed -i 's/TELEGRAM_BOT_TOKEN=.*/TELEGRAM_BOT_TOKEN=REDACTED/' .env.sanitized- GitHub Issues: Report bugs and issues
- GitHub Discussions: Community support
- Wiki: Check other wiki pages for specific topics
- Gluetun Issues: VPN-specific problems
Still having issues? Open a GitHub issue with your system info and logs.