12

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.

  • 1
    Check with a different Power supply. – Jaromanda X Nov 8 '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 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 8 '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 9 '15 at 4:09
  • Thank's for the suggestions. Ive added more info. Ill check the power problems. – janw Nov 9 '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 9 '15 at 16:20
7

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.

  • 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 9 '15 at 14:15
  • 1
    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 9 '15 at 19:35
  • @goldilocks I'll check this tonight. I didn't have the time yesterday. – janw Nov 10 '15 at 9: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 1:54
-1

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

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.