Jump to content

Troubleshooting:Service Troubleshooting: Difference between revisions

From jb-vpn.uk Wiki
Minor update - troubleshooting guide: Service Troubleshooting (7 sections) (troubleshooting)
Major update - troubleshooting guide: Service Troubleshooting (22 sections) (troubleshooting)
Line 1: Line 1:
= Service Troubleshooting =
This guide covers troubleshooting for reverse proxy services.
This guide covers troubleshooting for reverse proxy services.


Line 16: Line 14:
'''Solutions''':
'''Solutions''':
<pre class="lang-bash">
<pre class="lang-bash">
= Test from VPS to NAS =
==== Test from VPS to NAS ====
ping 10.8.0.2
ping 10.8.0.2
curl http://10.8.0.2:PORT_NUMBER
curl http://10.8.0.2:PORT_NUMBER


= Check if service is listening =
== Check if service is listening ==
= (from Synology NAS or via SSH) =
== (from Synology NAS or via SSH) ==
netstat -tlnp | grep PORT_NUMBER
netstat -tlnp | grep PORT_NUMBER
</pre>
</pre>
Line 36: Line 34:
'''Solutions''':
'''Solutions''':
<pre class="lang-bash">
<pre class="lang-bash">
= Check DNS =
==== Check DNS ====
nslookup newservice.jb-vpn.uk
nslookup newservice.jb-vpn.uk


= Verify port 80 is open =
== Verify port 80 is open ==
curl -I http://newservice.jb-vpn.uk
curl -I http://newservice.jb-vpn.uk


= Check firewall =
== Check firewall ==
sudo iptables -L -n -v | grep 80
sudo iptables -L -n -v | grep 80
</pre>
</pre>
Line 73: Line 71:
'''Solutions''':
'''Solutions''':
<pre class="lang-bash">
<pre class="lang-bash">
= Check VPN =
==== Check VPN ====
ip addr show tun0
ip addr show tun0
ping 10.8.0.2
ping 10.8.0.2


= Check routing =
== Check routing ==
ip route | grep 10.8.0.2
ip route | grep 10.8.0.2


= Test connectivity =
== Test connectivity ==
curl -v http://10.8.0.2:PORT_NUMBER
curl -v http://10.8.0.2:PORT_NUMBER
</pre>
</pre>
Line 87: Line 85:


<pre class="lang-bash">
<pre class="lang-bash">
= Check service status =
=== Check service status ===
systemctl status nginx
systemctl status nginx


= Test nginx configuration =
== Test nginx configuration ==
nginx -t
nginx -t


= View error logs =
== View error logs ==
tail -f /var/log/nginx/error.log
tail -f /var/log/nginx/error.log


= View access logs =
== View access logs ==
tail -f /var/log/nginx/access.log
tail -f /var/log/nginx/access.log


= Check SSL certificates =
== Check SSL certificates ==
certbot certificates
certbot certificates


= Test service directly =
== Test service directly ==
curl -I https://service.jb-vpn.uk
curl -I https://service.jb-vpn.uk
</pre>
</pre>

Revision as of 13:44, 1 January 2026

This guide covers troubleshooting for reverse proxy services.

Common Issues

Issue: 502 Bad Gateway

Causes:

  • Service not running on Synology NAS
  • 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

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

Causes:

  • Wrong proxy_pass URL
  • Missing headers
  • Service requires specific path

Solutions:

  • Check nginx error log: tail -f /var/log/nginx/error.log
  • Test with different proxy_pass formats

Issue: Connection Timeout

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

=== 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
  • [Adding Services](index.md) - Service configuration
  • [System Overview](index.md) - System architecture