1

I have a raspberry pi 2 with original power supply (5v 2a) from farnell with raspbian. Tried more than 4 sd cards (lexar class 10, kingston class 8, trasncendet class 10) connected to the router via ethernet cable.

This rpi it's on a remote location only as a controller for ubiquiti AP.

For some reason that I can't figure out, some times after 2 or 3 days, some others, after 1 week, rpi suddenly stop / crashes and don´t answer via ssh or even no ping at all. I have to manually unplug / plug the power cord. I can't understand that if crash and boot and crash again, if don't even boot...

This is quite frustating, cause I have to go this location (drive more than 20km) just to unplug / plug the power cord.

Steps that I made without sucess: -install watchdog, but on daemon.log appears that it's not doing nothing at all cause miss /dev/watchdog

Nov  1 23:27:15 raspberrypi watchdog[31974]: starting daemon (5.12):
Nov  1 23:27:15 raspberrypi watchdog[31974]: int=1s realtime=yes sync=no soft=no mla=24 mem=0
Nov  1 23:27:15 raspberrypi watchdog[31974]: ping: no machine to check
Nov  1 23:27:15 raspberrypi watchdog[31974]: file: no file to check
Nov  1 23:27:15 raspberrypi watchdog[31974]: pidfile: no server process to check
Nov  1 23:27:15 raspberrypi watchdog[31974]: interface: no interface to check
Nov  1 23:27:15 raspberrypi watchdog[31974]: test=none(0) repair=none(0) alive=/dev/watchdog heartbeat=none temp=none to=root no_act=no
Nov  1 23:27:15 raspberrypi watchdog[31974]: cannot open /dev/watchdog (errno = 2 = 'No such file or directory')

Cause I don't find out out it's happening, can anyone help me to read logs in order to find what's happening?

  • I've edited your title to make this question more specific. Note we aren't a discussion forum (please have a closer look at the tour). You'll have to break this down into separate questions if you want an answer to all of them. – goldilocks Nov 2 '15 at 12:44
2

It's pretty clear about there being no /dev/watchdog.

You may have to manually load the driver. Try:

sudo modprobe bcm2708_wdog
sudo modprobe bcm2835_wdt

And see if /dev/watchdog now exists. If it doesn't, or there are errors, immediately check tail -n 25 /var/log/syslog and/or journalctl -xn 25 to see if there is any explanation.

You can also double check the modules are loaded:

lsmod | grep _wd

To load the modules at boot, add them to /etc/modules, i.e.,

bcm2835_wdt
bcm2708_wdog

You may only need to be explicit about the last one, bcm2708_wdog. If that fails, try tail -n 500 /var/log/syslog | grep wdog after booting.

  • 1
    When I do modprobe bcm2708_wdog, system creates /dev/watchdog, but after reboot, this file /dev/watchdog dissapears. But anyway, even with this watchdog enable, how can dig into the real problem that it's causing this? – plopes Nov 2 '15 at 12:30
  • Yes, that will not persist across reboots. It is pretty odd the service does not do this itself. I've added a bit at the end about how to load them/it automatically. If by "real problem" you mean the crashing/going offline thing, that's a separate and more complex issue. – goldilocks Nov 2 '15 at 12:41
  • 1
    OK I add bcm2708_wdog to etc/modules, and after reboot the file at /dev/watchdog remains. Thanks for that @goldilocks. But I still want to dig to what really makes all of this. Wich logs or what can I do to get this needle? – plopes Nov 2 '15 at 12:47
  • 1
    /var/log/syslog should contain everything. You'll notice that the first message from boot is from rsyslogd indicating start, then messages from the kernel recognizable by the timestamp format -- seconds since start to six decimal places. This makes a boot easy to find by searching for the string 0.000000. Immediately before this stuff you'll find whatever messages were left before shutdown. Normally the last one should be rsyslogd exiting; if you pulled the plug that won't have happened, but there may be clues about why the system went offline or froze up. – goldilocks Nov 2 '15 at 12:52
  • I will dig... hope with this watchdog helps to prevent frozen state. Once I saw a program for noobs like me that we could upload our syslog and check errors... – plopes Nov 2 '15 at 13:42

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.