0

Every day my Raspberry Pi 4 4GB loses ethernet (wired) network connectivity (I don't use WiFi on the device). The device is otherwise still functional, but no matter whether I down/up the interface, restart networking with service networking restart, un/replug the network cable, or even shutdown -r now the device, the network does not return. The device must be fully halted shutdown -hP now, power pulled, and power returned for the network to also return.

Since I started taking notice of exactly when it went down (I have remote endpoint monitoring polling every 5 minutes), I've finally determined it is exactly 24h after the last power up that the network dies.

I can't find anything in /var/log/syslog or /var/log/messages, beyond software components failing to connect to things. avahi-daemon even mentions releasing IP addresses a while after it is clear the network has already gone, but no event to explain why.

Pi's uses:

  • Docker for these images: Plex, Netdata, Pi Hole, Tautulli, Traefik, among others
  • autossh to keep a tunnel to a remote server up

I can't figure it out. I don't know where else to look. Short of attempting to boot this same system from another of the exact same model of Pi I have, I don't know what other investigation to perform.

EDIT 20201231: Using a combination of:

  • tcpdump on the DHCP server/router
  • changing the DHCP lifetime in DHCP server to something short to ease diagnosis (5 minutes/300 seconds)
  • tracking the IP address lifetime on the Raspberry Pi (watch 'sudo ip addr | grep -A 3 eth0:' and watching 'preferred_lft')
  • sudo dcpdump -i /dev/eth0

...I've been able to see that the device does not appear to send any further DHCP packets over eth0/into the switch/to the router after boot. The preferred_lft gets to 0sec and the address is deprecated, then once valid_lft ticks through, the IPv4 address is dropped.

In a moment of weird thought, I wondered what would happen if I disabled the docker daemon using sudo systemctl disable docker, and after a reboot, I could see that the address would never get close to expiring (as is supposed to happen) and the DHCP lease would be renewed as intended. So clearly there is something about the Docker setup that is causing DHCP to go awry, hence requiring a reboot.

I'll have to play around with my Docker stacks (using docker-compose.yml files and running about 5-6 stacks) to make sure nothing untoward is in there. It may even be that a certain container has an incompatibility with the Raspberry Pi.

16
  • 1
    Your DHCP server may only issue 24 hour allocations, but without diagnostics who knows. One thing is certain service networking restart won't help as it isn't normally used. What does ip a && ip r show
    – Milliways
    Dec 7, 2020 at 0:51
  • 2
    DHCP leases being limited in time is completely normal. However, once the IP address expires, the Pi should automatically request and obtain a new one. Dec 7, 2020 at 9:11
  • Test with a fresh flashed Raspberry Pi OS Lite. If it also fails after 24h, then it's not a problem of the RasPi.
    – Ingo
    Dec 7, 2020 at 11:25
  • 1
    If they are actually blinking (erratically) that indicates activity -- although whether it could be the activity of a failure at the eth level or of faulty hardware I dunno...not an expert.
    – goldilocks
    Dec 8, 2020 at 14:29
  • 1
    @Ashley A hardware problem is very unlikely. Typical for hardware errors is that they occur randomly and not in a reproducible fixed time interval.
    – Ingo
    Dec 9, 2020 at 1:04

1 Answer 1

1

It appears that an update to the Raspberry Pi OS, the Raspberry Pi firmware, or the Realtek NIC firmware fixed this issue at some point mid January 2021 onwards. It no longer occurs.

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.