Raspberry Pi 2 loses ethernet connection

I’m not sure I would have thought of a static IP address either.

I reserve IPs for all of my RPis and IoT devices, for no reason other than I needed to years ago when I was using an Android app called Automation Manager to control my Kasa switches. Now I just do it out of habit.

What’s odd: Even with a static IP address I got exactly the same behavoir after a couple of days (deactivated ethernet adapter / dead ethernet LEDs) and the same log entries in syslog:

Jul 12 08:24:01 raspberrypi dhcpcd[579]: eth0: carrier lost
Jul 12 08:24:01 raspberrypi dhcpcd[579]: eth0: deleting route to 192.168.0.0/24
Jul 12 08:24:01 raspberrypi dhcpcd[579]: eth0: deleting default route via 192.168.0.1
Jul 12 08:24:01 raspberrypi avahi-daemon[406]: Withdrawing address record for 192.168.0.150 on eth0.
Jul 12 08:24:01 raspberrypi avahi-daemon[406]: Leaving mDNS multicast group on interface eth0.IPv4 with address 192.168.0.150.
Jul 12 08:24:01 raspberrypi avahi-daemon[406]: Interface eth0.IPv4 no longer relevant for mDNS.
Jul 12 08:24:02 raspberrypi avahi-daemon[406]: Got SIGHUP, reloading.
Jul 12 08:24:02 raspberrypi avahi-daemon[406]: No service file found in /etc/avahi/services.

In case someone has an idea, it would be highly appreciated, since I’m fighting with this behavior for months now.

Do you have anything using the USB ports on your raspberry pi?

My rpi3 has been crashing randomly for years and for me it looks like the USB ports become unavailable which disconnects my SSD. I believe the ethernet port shares the USB bus.

My problems started when I added a zwave stick and got worse the more things I connected to the USB ports.

Ha, good point. I am indeed using a z-wave and a wmbus stick.

What I’m currently trying out now (as said, I’ve tried out many things over the months) is

dtparam=eee=off

in /boot/config.txt in an attempt to make sure that it’s not related to some energy saving problem. Because, and I find this very peculiar, the Raspi keeps running like normal, but just the Ethernet device appears to be completely deactivated (as said, both LEDs on the port, link and activity, are dark).

Update: After having had this problem for over a year now, setting his parameter seems to have solved the problem (at least for now, t+11 days). Finally!

Update 2: Not so fast: Problem is back. Raspi is again not reachable, with the Ethernet LEDs being of until a reboot. So also the second potential fix related to the power saving did solve it. So probably not related to a power savings problem.

1 Like

Interesting thread, I’m having similar problems with my raspberry 4 setup (docker, openhab, zwave, external SSD) as well.
The system is running unstable and I wasn’t able to determine the cause. I’m stressing the little box to the edge, I must say: there’s openhab, nextcloud, a mysql db, mosquitto and a reverse proxy with Let’s Encrypt running …
I’m using the hardware watchdog to reboot the server and recently added a test for the network interface as well. Since then - fingers crossed - the box gets restarted without manual intervention.
I’ve had strange lockups of the box before where the watchdog didn’t trigger. The system was unreachable over ethernet, manual intervention didn’t work as well (keyboard, connected via USB).
Using the watchdog to restart the box almost daily isn’t a solution, I’d like to migrate some services to new raspberries, but that’s a different problem at the moment …

When I started with OpenHAB some time back, I had lots of problems with “system not reachable anymore”. As it turned out, I was looking at a bunch of root causes, which I managed to find and solve one after another, except for the one described above, which still drives me nuts (will open a thread in the official Raspberry forum soon).

Root causes I did find and fix:

  • Spontaneous freezes 1: SD card broken. Classic. I managed to find traces in the logs that led me to the culprit, though “green Raspi LED stuck being on” was also a good hint which I could’ve understood earlier. :wink:
  • Spontaneous feeezes 2: Swap too small. My setup also stresses the little box a lot. In the end, the systeminfo binding led me to the idea that “full swap” had something to do with it. Could be solved pretty easily.
  • Spontaneous “deactivated Ethernet”: As said, still no clue. Have tried many things so far…

Update: For those who’d like to follow / face similar problems: I did open a new thread in the Raspberry forum, since I believe I’m looking at a Raspi-specific problem (rather than an openHAB or Docker-specific problem).