Troubleshooting:Service Troubleshooting
Appearance
This guide covers troubleshooting for reverse proxy services on the VPS. Public HTTPS is handled by Caddy (/etc/caddy/Caddyfile).
Common Issues
[edit]Issue: 502 Bad Gateway
[edit]Causes:
- Backend not running (Docker on VPS or service on NAS)
- Caddy misconfigured or not reloaded after Caddyfile change
- Wrong port number
- Service not accessible via VPN
Solutions:
# Test from VPS to NAS ping 10.8.0.2 curl http://10.8.0.2:PORT_NUMBER # Test VPS-local Docker service curl -sI http://127.0.0.1:PORT_NUMBER # Check Caddy logs journalctl -u caddy -n 50 # Check if service is listening (from Synology NAS or via SSH) netstat -tlnp | grep PORT_NUMBER
Issue: SSL Certificate Failed
[edit]Causes:
- DNS not pointing to VPS
- Port 80 blocked
- Rate limiting from Let's Encrypt
Solutions:
# Check DNS nslookup newservice.jb-vpn.uk # Verify port 80 is open curl -I http://newservice.jb-vpn.uk # Check firewall sudo iptables -L -n -v | grep 80 # Validate Caddy config caddy validate --config /etc/caddy/Caddyfile
Issue: Service Not Loading
[edit]Causes:
- Wrong upstream URL in Caddyfile
- Missing proxy headers
- Service requires specific path
Solutions:
- Check Caddy:
journalctl -u caddy -n 50
- Verify backend directly:
curl http://127.0.0.1:PORT(VPS) orcurl http://10.8.0.2:PORT(NAS via VPN)
- Validate and reload:
caddy validate --config /etc/caddy/Caddyfile && systemctl reload caddy
Issue: Connection Timeout
[edit]Causes:
- VPN tunnel down
- Service not accessible
- Firewall blocking
Solutions:
# Check VPN ip addr show tun0 ping 10.8.0.2 cat /var/log/openvpn-status.log # Check routing ip route | grep 10.8.0.0 # Test connectivity curl -v http://10.8.0.2:PORT_NUMBER
Diagnostic Commands
[edit]# Caddy caddy validate --config /etc/caddy/Caddyfile systemctl status caddy systemctl reload caddy journalctl -u caddy -n 50 # OpenVPN (for NAS-backed services) systemctl status openvpn-server@server.service ip addr show tun0 cat /var/log/openvpn-status.log # Test public endpoint curl -I https://service.jb-vpn.uk # Docker stacks on VPS cd /var/www/wiki.jb && docker compose ps
Service-specific guides
[edit]- Plex: Troubleshooting:Plex Troubleshooting — auth, custom access URLs, Caddy pitfalls
- Nginx (legacy): Troubleshooting:Nginx Troubleshooting — host/WebApp internal nginx only
Related Documentation
[edit]- Services:Current Services — service inventory
- System:Components — Caddy, VPN, Docker components