lilzz
Posts: 411
Joined: Sat Nov 30, 2013 5:27 pm

Initial nonresponse of the pi as web server

Mon May 05, 2014 3:22 pm

Did a ifconfig and check its IP address there.
Bring up the Pi as web server.

From nearby client computer trying to connect to Pi which supposed to serve up the web pages.

Web pages not found!

From my client computer I did Ping to Pi, first 5 seconds request time out then after that, communication is established.

Now the web pages are served correctly.

It happens periodically,I need to use ping to re-establish the communication and have the Pi server back on.

So annoying, What cause this to happen?

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

Re: Initial nonresponse of the pi as web server

Mon May 05, 2014 3:29 pm

Check the web server is running on the RPi.

sudo apt-get install wget curl lynx # those three are the best tools to test any web server
netstat -tln # we're looking to see that something is listening on 0.0.0.0:80
lynx http://127.0.0.1:80 # try to fetch your home page

Check the RPi is connected to your LAN and can reach your gateway
ping -c3 8.8.8.8

If all is well then it's something external to the RPi.
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
Richard-TX
Posts: 1549
Joined: Tue May 28, 2013 3:24 pm
Location: North Texas

Re: Initial nonresponse of the pi as web server

Mon May 05, 2014 3:30 pm

It sounds like the Raspi is using a WIFI connection and that the wifi card is going to sleep. If so then
try adding the following to /etc/rc.local

iwconfig wlan0 power off

another option is to add the following to the interfaces file.


wireless-power off

power refers to power management.
Richard
Doing Unix since 1985.
The 9-25-2013 image of Wheezy can be found at:
http://downloads.raspberrypi.org/raspbian/images/raspbian-2013-09-27/2013-09-25-wheezy-raspbian.zip

Return to “General discussion”