Troubleshooting:Service Troubleshooting: Difference between revisions
Appearance
Major update - troubleshooting guide: Service Troubleshooting (22 sections) (troubleshooting) |
Updated documentation from markdown files |
||
| Line 6: | Line 6: | ||
'''Causes''': | '''Causes''': | ||
* | * Backend not running (Docker on VPS or service on NAS) | ||
* Caddy misconfigured or not reloaded after Caddyfile change | |||
* Wrong port number | * Wrong port number | ||
| Line 54: | Line 56: | ||
'''Solutions''': | '''Solutions''': | ||
* Check | * Check Caddy: <code>journalctl -u caddy -n 50</code> | ||
* Verify | * Verify backend directly: <code>curl http://127.0.0.1:PORT</code> (VPS) or <code>curl http://10.8.0.2:PORT</code> (NAS via VPN) | ||
* Test with different proxy_pass formats | * Test with different proxy_pass formats | ||
Latest revision as of 14:04, 16 May 2026
This guide covers troubleshooting for reverse proxy services.
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 == 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
Issue: Service Not Loading
[edit]Causes:
- Wrong proxy_pass URL
- Missing 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)
- Test with different proxy_pass formats
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 == Check routing == ip route | grep 10.8.0.2 == Test connectivity == curl -v http://10.8.0.2:PORT_NUMBER
Diagnostic Commands
[edit]=== Check service status === systemctl status nginx == Test nginx configuration == nginx -t == View error logs == tail -f /var/log/nginx/error.log == View access logs == tail -f /var/log/nginx/access.log == Check SSL certificates == certbot certificates == Test service directly == curl -I https://service.jb-vpn.uk
Related Documentation
[edit]- [Adding Services](index.md) - Service configuration
- [System Overview](index.md) - System architecture