This is something that seems to happen randomly to my little RaspberryPi 4B homeserver, like once every few months maybe.

What happens is that out of nowhere (meaning I didn't make any change to config or installation) I cannot reach any services I host on it (i.e. Jellyfin, Anchor notes...). I cannot access it via SSH at all, connection keeps timing out.

Ping however gives a signal. I can see/hear its running and doing something, since I hear the external HDD working. It is running headless and I have no monitor and/or keyboard I could connect.

So far my only way out is to just switch its power off, which is obviously not good for the hard drive. It has happened now like half a dozen times over the past few years, so I am wondering what a better way is to handle this. This was on RPI OS and now its happening on DietPi, so seems not related to the OS version.

I tried sending a shutdown signal via SSH but that also just times out, so how do I get it to shutdown properly?

Secondly, what kind of logs could I look at or start collecting to make sense of this?

you are viewing a single comment's thread
view the rest of the comments
[–] 1 point 12 hours ago

Aah you did mention that, my eyes just decided to skip that when I read your post.

This reminds me of another issue I ran into but I use Alpine Linux so I don't know if it's a distribution specific issue. I'll share the issue and workaround solution anyways as something to consider.

Networking on Alpine Linux is controlled by a process called networking and for reasons I don't understand and can't see by any logs, it just stops working. I can't ssh or access the reverse proxy port. I don't remember if ping was working or not as it's been a while since I dealt with it now.

My work around was to have a script on my server ping a known location and restart networking if it couldn't ping out. If a second ping after restarting the process failed, it would then restart the device. This script would run every 15 minutes.

It's a bandage solution that doesn't solve the problem but it does keep my server running. However it seems like pings still work with your server so you might need to get creative in how you test your server's connectivity.

  • source
  • parent