Johnnyjohnny
Posts: 8
Joined: Sun Sep 08, 2013 9:34 am

Raspberry dies after a day or so

Sun Nov 10, 2013 9:19 pm

I setup a raspberry PI to act as a little "bridge" to my 4G broadband network out in my summehouse during the autumn/winter in order to access a security camera I installed. The 4G I have does not allow open ports so the Pi uses VPN to connect to home and some port fowarding and tadaaa, I can access everything just fine.

But for some reason lately, it seems to die about 1 day in. It's not connection issues since I scripted it to reboot if connection to VPN is lost and reconfigure/restore all settings and reconnect. Last time it happened I was unable to login to the pi and had to unplug and plug it back in. Fine and dandy, about a day later it's not responding again. Need to get back out there and reboot it but I guess it will happen again.

Anyone got any idea what causes it to suddenly just die? I see no evidence in the syslog and the router itself seems to be very happy out there, just the security camera working.

Only I can think of is cold, but it's about 10 degrees celcius in there right now and the SD card can handle -25 and the Pi I guess can take more than 10 c.

Tested it at home for 2 weeks without issues and as soon as I placed the pi out there it's acting up.

User avatar
FTrevorGowen
Forum Moderator
Forum Moderator
Posts: 5438
Joined: Mon Mar 04, 2013 6:12 pm
Location: Bristol, U.K.
Contact: Website

Re: Raspberry dies after a day or so

Sun Nov 10, 2013 9:24 pm

Johnnyjohnny wrote: ...
Only I can think of is cold, but it's about 10 degrees celcius in there right now and the SD card can handle -25 and the Pi I guess can take more than 10 c.
Tested it at home for 2 weeks without issues and as soon as I placed the pi out there it's acting up.
What about damp - 10C is close to typical dewpoints? How is the Pi powered?
Trev.
Still running Raspbian Jessie or Stretch on some older Pi's (an A, B1, B2, B+, P2B, 3xP0, P0W, 2xP3A+, P3B+, P3B, B+, A+ and a B2) but Buster on the P4B's. See: https://www.cpmspectrepi.uk/raspberry_pi/raspiidx.htm

Johnnyjohnny
Posts: 8
Joined: Sun Sep 08, 2013 9:34 am

Re: Raspberry dies after a day or so

Sun Nov 10, 2013 9:33 pm

The air is pretty dry, it shouldn't be a problem, the router and the security camera and other electronic equipment in there is working fine. The Pi isn't completely dead, it's still on, but there is no way connecting to it, sadly I have no screen to connect to and see if there is any error on screen.

It's powered by a deltaco usb charger that says: output 5V / 1A so it should be enough.

1pi2much
Posts: 99
Joined: Sun Feb 24, 2013 6:58 pm

Re: Raspberry dies after a day or so

Mon Nov 11, 2013 2:40 am

What is the setup exactly?

Is it?

Camera --- USB --- Pi --- Wifi --- 4 G Router ?

Or is the Pi wired to the 4G Router?

--

Ghostatwar
Posts: 2
Joined: Tue Sep 10, 2013 8:00 pm

Re: Raspberry dies after a day or so

Mon Nov 11, 2013 6:48 am

I'm having a similar problem , pi also dies after about a day or even less ( 6-12 hours ). lights are all still flashing , power supply is an apple usb charger (5v 1a). plugged the pi into the hdmi port on my TV so that when it dies I could see if the pi was still running and it isn't just the Ethernet port dropping out but no such luck about an hour in the TV just go's black.

would be nice to run a script that makes a log ever 1min so E.G the pi drops off the network at 3am in the morning while I'm fat and asleep. than at 6 when I wake up could try ssh into the pi if I see its dropped off the network, wait 10 - 15 min and hard reboot it ( remove power ) and see when the last 1min log was, if the log was anywhere around 6:10 - 16:15. we would know if the pi is completely dead or if the Ethernet port was just dropped out completely.

Johnnyjohnny
Posts: 8
Joined: Sun Sep 08, 2013 9:34 am

Re: Raspberry dies after a day or so

Mon Nov 11, 2013 10:06 am

1pi2much wrote:What is the setup exactly?

Is it?

Camera --- USB --- Pi --- Wifi --- 4 G Router ?

Or is the Pi wired to the 4G Router?

--
The setup is Pi wired => 4G router and camera => 4G router via wifi. So they are separate. Nothing is plugged into the Pi except the network cable and power.

The Pi also have a ftp server to receive incoming images from the camera, but that only triggers if motion is detected (then scp'd over to my home server for secure storage before anyone is able to disconnect the router)

User avatar
Davespice
Forum Moderator
Forum Moderator
Posts: 1665
Joined: Fri Oct 14, 2011 8:06 pm
Location: The Netherlands
Contact: Twitter

Re: Raspberry dies after a day or so

Mon Nov 11, 2013 1:10 pm

Hi there, I think it might be worth looking at the syslog when you have regained control of the Pi after it has stopped responding.
This will give you the last 2000 lines, something in there might give you a clue?

Code: Select all

 tail -n 2000 /var/log/syslog
You can also use this command to read out an on board temp sensor, perhaps you could make it log this to a text file or something?

Code: Select all

/opt/vc/bin/vcgencmd measure_temp

jamesh
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 25370
Joined: Sat Jul 30, 2011 7:41 pm

Re: Raspberry dies after a day or so

Mon Nov 11, 2013 1:18 pm

No idea if this is the problem, but....I suffered from network drop out when using the camera. I assumed my power supply was fine - a bench device. BUT, the supply was fine, but the cable wasn't. At the Pi itself the voltage dropped right down and when the camera was started, the ethernet chip wasn't getting enough juice and stopped.

I am wonder whether you have a similar issue - your power supply right on the edge, and after a while it's all too much. Note that cold weather will increase the resistance in the power cable, maybe pushing it too far.

You need to check the voltage between TP1 and TP2 and see what happens.
Principal Software Engineer at Raspberry Pi (Trading) Ltd.
Contrary to popular belief, humorous signatures are allowed. Here's an example...
“I own the world’s worst thesaurus. Not only is it awful, it’s awful."

obcd
Posts: 917
Joined: Sun Jul 29, 2012 9:06 pm

Re: Raspberry dies after a day or so

Mon Nov 11, 2013 5:22 pm

Not really a solution, but you could enable the watchdog. You could even ping an adress at regular intervals, and have it trigger the watchdog if it can't reach it's destination. This would at least save you the trip to power cycle it when things go wrong. You can create some loggings yourself when the watchdog is triggered so that you can check if something strange happens before the problem.

As the Pi is not really interfaced to something besides network wise, you shouldn't need extra current from it's supply. Maybe the supply voltage drops a little when temperature get's lower. You might check that first.

1pi2much
Posts: 99
Joined: Sun Feb 24, 2013 6:58 pm

Re: Raspberry dies after a day or so

Mon Nov 11, 2013 5:37 pm

The next time you go there, check if the images got uploaded to the pi from the
camera. That would indicate that the local ethernet is working and the problem
is with 4G.
You could keep a cronjob log of ping s to a known address to see if the PI loses connection
on the ethernet at any point. Maybe frequent DHCP changing IPs for the the 4G router
confuse the PI. Although this usually happens with wifi, so people have ifdown/ifup scripts
running in case ping fails.

Do you reboot/reconnect the PI if the scp fails?

Oh and also, you said you are VPN ing from the PI, is that just during the scp, or all the time?

--

NeillyThere
Posts: 7
Joined: Thu Jul 25, 2013 12:41 pm
Location: England, UK

Re: Raspberry dies after a day or so

Tue Nov 12, 2013 9:16 am

Without fully reading and digesting the posts above, your issue is reminiscent of a network adapter entering power saving mode - In which it effectively switches off due to lack of traffic. The effect of this on a headless system is that to all intents and purposes the system seems dead (just the power led is on - but if you watch carefully you may notice the activity led flash occasionally). If it is due to this, the fix is probably simple, add the following line (or similar depending upon your own configuration) at the bottom of your /etc/networks/interfaces file.

iwconfig xxxxx power off

That tells the xxxxx device not to use power management. You'd need to replace the xxxxx with the appropriate device, probably wlan0 or eth0.

The manual (man iwconfig) of course has details for iwconfig power settings.


Hope that helps.
NeillyThere.

Johnnyjohnny
Posts: 8
Joined: Sun Sep 08, 2013 9:34 am

Re: Raspberry dies after a day or so

Tue Nov 12, 2013 8:41 pm

Hey everyone, sorry for not responding in a timely manner, went to a hockey game last night and been busy at work :)
Thank you all for thoughts and input, greatly apreciated.

The Pi uses vpn to talk to "home" and each 10 minutes there is a cronjob looking for the ppp0 connection. if none is found, it will reset the settings and reboot and automatically reconnect to the VPN. This has been working flawlessy when I had the device at home for 2-3 weeks. (had the 4g router at home to set it all up)

Might be the temperatures fault, I do have the temperature command setup in a "hello" mail each reboot, but I might want to log it more often and login remotely to check the cpu temp. Maybe putting some load on the cpu will help haha :).

Trying to disable power management might also be something to look at.
First thing im gonna do when I get out to the cabin on friday is to run rpi-update, you never know :).

Last time there was nothing in the syslog, just normal operations then nothing, and then my reboot. hopefully we get something this time. I'll know on friday for sure.

Johnnyjohnny
Posts: 8
Joined: Sun Sep 08, 2013 9:34 am

Re: Raspberry dies after a day or so

Fri Nov 15, 2013 1:29 pm

I reset the Pi and booted fine, also connected to home. Went away for a couple of hours, connected to the Pi and started a rpi-update and the Pi disconnected while downloading the files zzzzz. So much for that trip , didn't even get time to transfer the syslog.

I believe it's probably the temperature, probably too cold. or the SD card that experiencing issues.

Johnnyjohnny
Posts: 8
Joined: Sun Sep 08, 2013 9:34 am

Re: Raspberry dies after a day or so

Tue Jan 14, 2014 10:00 pm

Hello again, I thought I should update this thread a bit, I seem to have solved the problem.

One of my coworkers experienced similar situation (except the cold temperature) and he suggested to get a new PSU with 2A output. So I bought a new samsung charger with 2A output instead of my deltaco charger and now it seems to work flawlessly, and the temperature has been as low as minus 3 degrees celcius last sunday when I installed the new charger.

CPU temp hovers around 28 c
Been running for nearly 4 days without problem, before it took a few hours to a day before it gave up.

Return to “Troubleshooting”