-
Notifications
You must be signed in to change notification settings - Fork 5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Raspberry Pi 4: DHCPCD route socket overflowed #4092
Comments
I have a similar problem. It seems to be, that dhcpcd in the raspberry pi OS Version, which is:
Fails if there are to many network interfaces. It Seems like you also have docker running on the pi. On my side, the dhcpcd and dhcpcd5 daemon will not come up on a fresh reboot. I have about 10 docker containers running in several docker-compose projects. If I shut down the compose projects before rebooting the Pi (its a Pi4) then everything is working fine and the daemon is coming up. I read in another forum, that this should be fixed in a newer dhcpcd Version and it is a known bug. So dhcpcd fails if there are too many network interfaces. Perhaps somebody has a workaround or even a fix for that. |
@alaub81 do you have a link to that issue so that I can track the progress? |
@jwillmer I just read it here: forums.gentoo.org |
Fastest workaround: It exclude the virtual container interfaces from dhcpcd. |
@FP2K-Minske thank you, just tried it right now and it seems to work :-) |
I had the same exact issue with Docker and denying veth interfaces solved the issue for me! Much appreciated ;) |
Here to confirm that the FP2K's workaround also worked for me. I was tracking this problem and I can say this solution also works. In addition, I was observing that this problem occurs every time the DHCP lease duration expires (4h by default). So dhcpd service crashes and the Raspberry Pi became offline but stays powered on. I have the exact same scenario: multiples docker interfaces. Fortunately the two mentioned workarounds above fix this thing. EDIT: After @cpannwitz's comment below, I have to clarify. I've tested both solutions I mentioned above individually. I didn't applied both simultaneously. |
In Addition to the fix by @FP2K-Minske and @daniel-asilva (both fixes applied),
afterwards, because there were complaints about changed conf files on disk, EDIT: In my case, applying BOTH fixes (see above) did NOT work. I had to remove the fix posted by @daniel-asilva , and had to move |
dhcpcd and docker: edit solution taken from raspberrypi/linux#4092
This happened to me from the time I set wlan0 static IP from GUI. I see it happening the same thing from this thread https://raspberrypi.stackexchange.com/questions/58809/rpi-loses-its-wlan0-configuration-when-any-docker-container-is-started/117381#117381 It was solved disabling DHCP for virtual interfaces with the But I suspect when you set IP only, it looks for the resto configuration over all networks including veth new ones. I will try to confirm this issue setting all static config requested on GUI and see what happens. This is so crazy I was getting TLS and socket resset errors in my stack, and I was thinking for a month it was my stack issue. |
Just for a month? :P I've been having network crashes (same symptoms, docker swarm cluster) for well over a year, and going back even to raspberry pi 3 kernels and I could never pinpoint this in any way. If this actually works I'll be ecstatic :D Thanks for posting this workaround folks! |
This comment was marked as abuse.
This comment was marked as abuse.
Encountered same problem and after a week of searching, I finally found the answer here. seems that this issue is still not I have two raspberry 4 with Raspberry Pi OS(64 bit) installed, have docker running in both, and both lost it ethernet connection after 2~3 days of poweron. and I have to manually reboot it every time to get it recovery...
|
I'd like to note that this is still an active issue, and the fix mentioned in #4092 does resolve it. I wish it hadn't taken me weeks to find this thread, but very happy I did. I'm curious if this also persists on alternate distros like DietPi |
Same here - thanks @FP2K-Minske - doesn't even feel very hacky - simply telling dhcpcd not to do something that it probably sensibly tries to do by default. |
Been experiencing a similar problem too. Headless Raspberry Pi 4 with 10 docker containers (and corresponding veth* interfaces). Was regularly loosing connectivity on eth0 after a couple of weeks of uptime. Only suspicious thing I could find in the logs is the mentioned "DHCPCD route socket overflowed" message. I will try the "denyinterfaces" option for dhcpcd 🤞. |
Maybe updating dhcpcd to a version >= 9.2.0 could also help. There are a few interesting notes in the changelog of that version that seem related... The latest dhcpcd version available on Raspberry Pi OS is |
Just wanted to register another vote to bring dhcpcd up to a version more recent than 2019, as there have been a lot of improvements since then. |
I ended up using raspi-config to switch to NetworkManager on all my pis instead of dhcpd - not had a problem since. |
This bug is especially strange since I don't use IPv6 anywhere, but it seems like 6+ independent containers create the conditions for overflow. |
The issue is still perisistent. I realized that after enabling IPv6 in my network and going with docker ~10 containers. Initially I thought there's a DHCP issue on my router (too narrow DHCP lease time), but it's like in this thread - at some point dhcpd is giving up not renewing DHCP leases regardless of how the DHCP server is being configured. It took me several hours to debug the matter with dhcpd and find this tread. It's a very confusing kind of error! Meanwhile, I'm using what @bfren has proposed above - using newtork-manager instead of dhcpd. Dhcpd should be either updated or network-manager should be the default in the OS. Otherwise an user is going to be faced with strange networking issues that are hard to troubleshoot whenever wanting to do some more serious work with Pi and networking :-( |
This comment was marked as abuse.
This comment was marked as abuse.
Indeed. The decision has been made, for whatever reasons (however good - presumably there are consequences to using later versions of If not, given doing that would easily fix the strange and definitely hard to troubleshoot issues caused by having relatively few Docker containers, I don't see why it hasn't been done. |
It seems that the release notes for the latest Raspberry Pi OS version (based on Bookworm), contain this line:
|
@ferrarimarco that is curious, when I used the Bookworm image to install a new Pi 5, the default was still |
Really appreciate this, i've been tearing my hair out trying to figure out why this wasn't working and this fixed it. Thanks again! 👍 |
Describe the bug
Every now and then my Pi is loosing it's IPv6. I found out that I can fix the issue temporarily via
systemctl restart dhcpcd
. Today it happened again and I usedsystemctl status dhcpcd
to look at the state. I got the following output:I don't have enough knowledge about Linux to say that this is the right channel for this issue. Please be kind and redirect me if this issue is completely off topic.
To reproduce
I don't know. I can't find a pattern, it just happens now and then.
System
Which model of Raspberry Pi?
Raspberry Pi 4
Which OS and version (
cat /etc/rpi-issue
)?vcgencmd version
)?uname -a
)?Linux home-server 5.10.6-v7l+ #1393 SMP Mon Jan 11 15:09:41 GMT 2021 armv7l GNU/Linux
Additional context
I am only running docker containers on the Pi. I boot the OS from an SSD drive but this I did only recently and I had the issue before as well.
The text was updated successfully, but these errors were encountered: