TW79
Posts: 36
Joined: Wed Jul 02, 2014 4:09 pm

Web Server Intermittent

Fri Nov 28, 2014 5:31 pm

Howdy all,

I have set up my Pi as a web server using Apache2 and PHP5. I have also set up noip2 and opened port 80 on my router to point to the PI's IP. The PI has been assigned a static IP.

I'm having issues with the website that I am hosting (www.weitzeltree.net) being unreachable intermittently. There are times when I cannot connect to the site for hours on end, but then the site comes back up, without any input from me.

I'm not quite sure where to look for a solution to this. I could understand if I could NEVER connect, but an intermittent problem really baffles me.

What could be the issue?

User avatar
DougieLawson
Posts: 39296
Joined: Sun Jun 16, 2013 11:19 pm
Location: A small cave in deepest darkest Basingstoke, UK
Contact: Website Twitter

Re: Web Server Intermittent

Fri Nov 28, 2014 5:55 pm

What happens when your public IP address changes? Are you running the dynamic dns client program from NoIP on your Raspberry Pi or on your router?

https://www.noip.com/download?page=linux
Note: Any requirement to use a crystal ball or mind reading will result in me ignoring your question.

Criticising any questions is banned on this forum.

Any DMs sent on Twitter will be answered next month.
All non-medical doctors are on my foes list.

TW79
Posts: 36
Joined: Wed Jul 02, 2014 4:09 pm

Re: Web Server Intermittent

Fri Nov 28, 2014 5:58 pm

Noip2 is being run on the Pi. I had it updating every hour, but just changed it to 5 minutes. I found a forum thread that indicated if the Pi doesn't have any internet activity, then the port isn't being listened to. I also noticed that when I was on an external computer, the site didn't come up, but once I connected via the internal network, the external laptop connected immediately.

Hoping the frequent update keeps the site up.

User avatar
B.Goode
Posts: 10356
Joined: Mon Sep 01, 2014 4:03 pm
Location: UK

Re: Web Server Intermittent

Fri Nov 28, 2014 6:01 pm

TW79 wrote:I'm not quite sure where to look for a solution to this. I could understand if I could NEVER connect, but an intermittent problem really baffles me.

What could be the issue?
I have no idea what the issue could be. And intermittent problems are always a challenge...

I'd start by trying to refine whether the problem is with the wider internet, or with your local network and the RPi.

With regard to the times when you don't have remote connectivity:
  • does a traceroute from the remote location find a path to your local router (the one hosting your RPi)?
    are you also denied access to the server if you access it from the local LAN?
    does the RPi respond to other kinds of local network traffic, such as ssh or ping?

User avatar
DougieLawson
Posts: 39296
Joined: Sun Jun 16, 2013 11:19 pm
Location: A small cave in deepest darkest Basingstoke, UK
Contact: Website Twitter

Re: Web Server Intermittent

Fri Nov 28, 2014 6:05 pm

Is the RPi wired to your router or is it a WiFi connection?
If WiFi have you disabled power management for your WiFi dongle?

Does anything show up in /var/log/syslog /var/log/dmesg /var/log/messages that might explain what's happening?
Note: Any requirement to use a crystal ball or mind reading will result in me ignoring your question.

Criticising any questions is banned on this forum.

Any DMs sent on Twitter will be answered next month.
All non-medical doctors are on my foes list.

TW79
Posts: 36
Joined: Wed Jul 02, 2014 4:09 pm

Re: Web Server Intermittent

Fri Nov 28, 2014 6:07 pm

I used ipfingerprints.com to determine port status. When the site was down, port 80 gave a report of "Filtered" which (according the the site) means "A port is marked as "filtered" when the packets are sent to that port, however packet filtering (e.g., firewall) prevents the packets from reaching that port."

When I can access the site, the port is marked as "Open." and everyone is happy.

I am always able to access the site while on the internal network. This is what is leading me to believe that the issue is the Pi not listening after a certain amount of inactivity.

The Pi is currently hardwired to the router. I will have it on WiFi later (after this is all sorted out).

User avatar
DougieLawson
Posts: 39296
Joined: Sun Jun 16, 2013 11:19 pm
Location: A small cave in deepest darkest Basingstoke, UK
Contact: Website Twitter

Re: Web Server Intermittent

Fri Nov 28, 2014 6:31 pm

Filtered means connect didn't get a SYN/ACK, connect got a SYN/RST. It does NOT mean you're filtering.

Try http://www.whatsmyip.org/port-scanner/server/ which gives more sane results.
Note: Any requirement to use a crystal ball or mind reading will result in me ignoring your question.

Criticising any questions is banned on this forum.

Any DMs sent on Twitter will be answered next month.
All non-medical doctors are on my foes list.

User avatar
B.Goode
Posts: 10356
Joined: Mon Sep 01, 2014 4:03 pm
Location: UK

Re: Web Server Intermittent

Fri Nov 28, 2014 6:42 pm

TW79 wrote: I am always able to access the site while on the internal network. This is what is leading me to believe that the issue is the Pi not listening after a certain amount of inactivity.
I don't understand that conclusion. Surely if you can always access it from the internal network it must always be listening?

(My model of this is that the 'internal' side of your router is simply another node on your local area network: my deduction from your description is that traffic is either not reaching the external side of your router, or your router is not forwarding it to the internal host.)

Return to “Troubleshooting”