16

I know my problem is too vague to solve the root problem. Please help me on my way.

My problem
I have a Pi setup with owncloud. And a external hard drive with videos on it.
It just functions as a NAS. I use SFTP for all my connections.
But it (seemingly) crashes at random. It crashed last night when it was idling, and does so a few times a week. Pulling the plug and reinserting it creates a successful reboot.

It is up to date.

  • It's a Pi 2 Model B.
  • I tried 2 different power supplies for the Pi. Neither had problems with an older Pi model.
  • The external drive is externally powered.
  • I run the Pi headless.
  • When it crashes I can't login or reach it in any way. The power LED is lit.

My question:

  • Where should I look to narrow this down?
  • What might I do the log this behaviour?
  • Where is a place to get more specific support for this kind of broad, vague problems?

What helped so far

A comment made by Goldilocks to determine the difference if it really crashes or I just can log in.

...by using hdmi_force_hotplug=1 in /boot/config.txt; then plugging in a screen should show an input, and plugging in a keyboard and hitting the space bar a bit should show something on the screen (or not).

Now I at least see when it crashes. Follow-up question here.

Aurora0001
  • 6,308
  • 3
  • 23
  • 38
janw
  • 523
  • 3
  • 7
  • 19
  • 1
    Check with a different Power supply. – Jaromanda X Nov 08 '15 at 21:32
  • 1
    How are you powering the disk drive? If it is powered from the Pi. Please try with a powered USB hub between the Pi and the drive. You may be having power issues. You should also follow this guide to rule out power issues http://elinux.org/R-Pi_Troubleshooting#Troubleshooting_power_problems - note this is not fool proof as the drive may only be drawing enough to cause problems intermittently - hence my suggestion of using a powered hub. – Steve Robillard Nov 08 '15 at 21:38
  • When you say it crashes what do you mean? what specifically happens? how do you know it has crashed? do you have a monitor attached, or are you running headless? – Tyson Nov 09 '15 at 04:09
  • Thank's for the suggestions. Ive added more info. Ill check the power problems. – janw Nov 09 '15 at 14:16
  • With your newly added info, I bet it's still running. How does it connect to the network? Wifi or Ethernet cable? Do you have a monitor you can attach, so that you can troubleshoot what is failing? – Tyson Nov 09 '15 at 16:20
  • @Tyson I have it connected with an ether cable. In the answer below is a suggestion to force the hdmi. I'll try that. – janw Nov 10 '15 at 09:23

3 Answers3

12

Some places to look for errors:

The command dmesg will return most of the activity of the current boot.

dmesg returns every event after the boot and how long after the boot, in seconds.

The files /var/log/messages /var/log/syslog and /var/log/kern.log will return pretty much every event you could ever need to know to figure out what happened.

goldilocks
  • 58,859
  • 17
  • 112
  • 227
Patrick Cook
  • 6,365
  • 7
  • 37
  • 63
  • Thanks for the answer. I'll check later in the evening. Because I'm at work and I cant reach it because... Wait for it... It crached. – janw Nov 09 '15 at 14:15
  • 2
    You don't know that it crashed, you just know that you can't log into it remotely. /var/log/syslog, which has timestamps, may provide some clues about what's up. You could also confirm the difference between "crash" and "offline" by using hdmi_force_hotplug=1 in /boot/config.txt; then plugging in a screen should show an input, and plugging in a keyboard and hitting the space bar a bit should show something on the screen (or not). – goldilocks Nov 09 '15 at 19:35
  • @goldilocks I'll check this tonight. I didn't have the time yesterday. – janw Nov 10 '15 at 09:21
  • @janw Did this answer your question or our you still looking for places to check for why it crashed? – Patrick Cook Nov 28 '15 at 01:54
  • What would it mean if the logs start since the last boot? As in there is nothing about the "crash", as the logs begin when the pi was rebooted after the "crash". – TwoFingerRightClick May 09 '22 at 17:17
0

It could be something that is running lots of background processes. I once think I crashed a RPI with chromium. I ran lots of instances of it and it froze. I saw the green light and it was holding its light on. disconnect the drive. if that does not work, back up anything you want to keep and reinstall the OS. if that does not work, I got nothing.

0

I don't know if this helps but I read something on Reddit the other day about how reading/writing to the SD card too quickly would result in a system hang on the Pi. I realize you have a hard drive hooked up but maybe the Pi is having the same problem? I'll try to find the post and link it.

Found it: Link to the post