877
Posts: 1
Joined: Thu Apr 01, 2021 5:17 pm

Pi 4 started losing eth0 connection every day

Thu Apr 01, 2021 5:40 pm

Hello all,

After many months of no issues, the last few days my Pi 4 has dropped off my home network, around 22hrs apart. It seems to lose ethernet connection, then attempt to connect to WiFi unsuccessfully.

The Pi continues running its cron task etc, and after power cycling runs again perfectly for another day'ish.

Could anyone give some advice on what is occurring please?
I have other logs if it's safe to share them?

Details:
Raspberry Pi 4 (4GB) running headless
Raspbian GNU/Linux 10 (buster), Linux raspberrypi 5.4.79-v7l+ #1373
Ethernet static IP via router outside of DHCP range (UniFi UDMP)


daemon crash logs snippets (recent first)

1st April 2021 - 16:17hrs
https://pastebin.com/Gh7UEEVK

31st March 2021 - 14:42hrs
https://pastebin.com/CzLfRNW5


Code: Select all

Apr  1 16:17:16 raspberrypi avahi-daemon[404]: Withdrawing address record for 192.168.1.95 on eth0.
Apr  1 16:17:16 raspberrypi avahi-daemon[404]: Leaving mDNS multicast group on interface eth0.IPv4 with address 192.168.1.95.
Apr  1 16:17:16 raspberrypi avahi-daemon[404]: Interface eth0.IPv4 no longer relevant for mDNS.

epoch1970
Posts: 6952
Joined: Thu May 05, 2016 9:33 am
Location: France

Re: Pi 4 started losing eth0 connection every day

Fri Apr 02, 2021 4:42 pm

There is nothing of interest in these logs except a lot of docker activity.
Check docker doesn't interfere with the network and the operation of dhcpcd. It can do that...
"S'il n'y a pas de solution, c'est qu'il n'y a pas de problème." Les Shadoks, J. Rouxel

juandelasvacaciones
Posts: 2
Joined: Mon Apr 26, 2021 9:06 pm

Re: Pi 4 started losing eth0 connection every day

Mon Apr 26, 2021 9:18 pm

Hello,
Have you find any solution?

I am having the exact same issue with my raspberry 4 running many dockers. The eth0 network gets dropped and only a restart make it available again.
The only message found in the logs are the same as you, when avahi detects the eth0 drop.

Code: Select all

/usr/sbin/ethtool eth0
Working eth0: https://pastebin.com/0cWqijpu
Not working eth0: https://pastebin.com/cDb691ww

Code: Select all

ifconfig
Working eth0: https://pastebin.com/qYBisnY3
Not working eth0: https://pastebin.com/6R88JrHw
Notice all dockers interface have disappeared.

How to find the reason of this, or to isolate the docker making the issue?

juandelasvacaciones
Posts: 2
Joined: Mon Apr 26, 2021 9:06 pm

Re: Pi 4 started losing eth0 connection every day

Thu Apr 29, 2021 7:54 pm

Hello,
Hope it helps. The problem I was having and that you may be having comes from an issue with the dhcpcd service that crashes because of the many requests from dockers.

Code: Select all

journalctl -u dhcpcd
Was showing this :

Code: Select all

Apr 28 21:24:58 rasp4 dhcpcd[575]: route socket overflowed - learning interface state
Apr 28 21:24:58 rasp4 dhcpcd[575]: vethcbc3663: soliciting a DHCP lease
Apr 28 21:24:58 rasp4 dhcpcd[575]: veth596e6a5: soliciting a DHCP lease
Apr 28 21:24:58 rasp4 dhcpcd[575]: vethed6da20: carrier acquired
Apr 28 21:24:58 rasp4 dhcpcd[575]: vethed6da20: IAID 70:85:aa:23
Apr 28 21:24:59 rasp4 systemd[1]: dhcpcd.service: Main process exited, code=killed, status=11/
Apr 28 21:25:17 rasp4 systemd[1]: dhcpcd.service: Failed with result 'signal'.
And 12h later the dhcp lease was expiring, dropping the ipv4 address.

The solution (from https://github.com/raspberrypi/linux/issues/4092/) :
Fastest workaround:

Code: Select all

sudo nano /etc/dhcpcd.conf
Insert the following line at the end:

Code: Select all

denyinterfaces veth*
It exclude the virtual container interfaces from dhcpcd.

Return to “Troubleshooting”