3

Every day at pretty exactly 7 a.m. my headless Raspbery Pi zero stops responding to network pings and it is not possible to ssh into it any more and I cannot figure out why that is or how to fix it. My router only shows an IPv4 address for the pi and not IPv6 address any more after this happens.

Things I have tried to fix this:

  • A reboot of the pi (by unplugging power) fixes the issue until the next day.
  • A reboot of the router also fixes the issue until the next day.
  • I have tried disabling various cron jobs that run around this time and this has NOT fixed the issue.
  • Scheduling a reboot of the pi after the issue arrises (e.g. at 7.05 a.m.) fixes the problem temporarily as a workaround (but is undesirable since I do not want to reboot the pi so often)
  • Setting the regdomain in /etc/default/crda does not fix the issue with systemd-udevd[14334]: Process '/sbin/crda' failed with exit code 255. that might be related to this (but not sure it is).

There seems to be some interaction with the avahi-daemon and dhcpcd as those are the last entries around this time in the /var/log/syslog.

This might be related to this entry in the syslog (but not sure it is) Feb 16 07:04:20 raspberrypi systemd-udevd[21618]: Process '/sbin/crda' failed with exit code 255.

I am runnning Raspbian GNU/Linux 10 (buster).

I am pasting the syslog events around that time for reference.

Feb 14 07:00:35 raspberrypi dhcpcd[454]: wlan0: carrier lost
Feb 14 07:00:35 raspberrypi dhcpcd[454]: wlan0: deleting address 2a03:8109:9d80:76f8::8842/128
Feb 14 07:00:35 raspberrypi avahi-daemon[295]: Withdrawing address record for 2a03:8109:9d80:76f8::8842 on wlan0.
Feb 14 07:00:36 raspberrypi dhcpcd[454]: wlan0: deleting address 2a03:8109:9d80:76f8:c2f9:b3c:e216:11d8/64
Feb 14 07:00:36 raspberrypi avahi-daemon[295]: Withdrawing address record for 2a03:8109:9d80:76f8:c2f9:b3c:e216:11d8 on wlan0.
Feb 14 07:00:36 raspberrypi avahi-daemon[295]: Leaving mDNS multicast group on interface wlan0.IPv6 with address 2a03:8109:9d80:76f8:c2f9:b3c:e216:11d8.
Feb 14 07:00:36 raspberrypi avahi-daemon[295]: Joining mDNS multicast group on interface wlan0.IPv6 with address fe81::e927:dd3a:1dcd:c2b5.
Feb 14 07:00:36 raspberrypi avahi-daemon[295]: Registering new address record for fe81::e927:dd3a:1dcd:c2b5 on wlan0.*.
Feb 14 07:00:36 raspberrypi dhcpcd[454]: wlan0: deleting route to 2a03:8109:9d80:76f8::/64
Feb 14 07:00:36 raspberrypi dhcpcd[454]: wlan0: deleting default route via fe81::fa8b:37ff:feb5:cc68
Feb 14 07:00:36 raspberrypi systemd-udevd[14334]: Process '/sbin/crda' failed with exit code 255.
Feb 14 07:00:37 raspberrypi dhcpcd[454]: wlan0: deleting address fe81::e927:dd3a:1dcd:c2b5
Feb 14 07:00:37 raspberrypi avahi-daemon[295]: Withdrawing address record for fe81::e927:dd3a:1dcd:c2b5 on wlan0.
Feb 14 07:00:37 raspberrypi avahi-daemon[295]: Leaving mDNS multicast group on interface wlan0.IPv6 with address fe81::e927:dd3a:1dcd:c2b5.
Feb 14 07:00:37 raspberrypi avahi-daemon[295]: Interface wlan0.IPv6 no longer relevant for mDNS.
Feb 14 07:00:37 raspberrypi avahi-daemon[295]: Withdrawing address record for 192.168.0.82 on wlan0.
Feb 14 07:00:37 raspberrypi avahi-daemon[295]: Leaving mDNS multicast group on interface wlan0.IPv4 with address 192.168.0.82.
Feb 14 07:00:37 raspberrypi dhcpcd[454]: wlan0: deleting route to 192.168.0.0/24
Feb 14 07:00:37 raspberrypi dhcpcd[454]: wlan0: deleting default route via 192.168.0.1
Feb 14 07:00:37 raspberrypi avahi-daemon[295]: Interface wlan0.IPv4 no longer relevant for mDNS.
Feb 14 07:00:37 raspberrypi dhcpcd[454]: wlan0: carrier acquired
Feb 14 07:00:37 raspberrypi dhcpcd[454]: wlan0: IAID eb:87:cd:c6
Feb 14 07:00:37 raspberrypi dhcpcd[454]: wlan0: adding address fe81::e927:dd3a:1dcd:c2b5
Feb 14 07:00:37 raspberrypi avahi-daemon[295]: Joining mDNS multicast group on interface wlan0.IPv6 with address fe81::e927:dd3a:1dcd:c2b5.
Feb 14 07:00:37 raspberrypi avahi-daemon[295]: New relevant interface wlan0.IPv6 for mDNS.
Feb 14 07:00:37 raspberrypi avahi-daemon[295]: Registering new address record for fe81::e927:dd3a:1dcd:c2b5 on wlan0.*.
Feb 14 07:00:38 raspberrypi dhcpcd[454]: wlan0: soliciting an IPv6 router
Feb 14 07:00:38 raspberrypi dhcpcd[454]: wlan0: rebinding lease of 192.168.0.82
Feb 14 07:00:38 raspberrypi dhcpcd[454]: wlan0: probing address 192.168.0.82/24
Feb 14 07:00:42 raspberrypi weewx[374] INFO weewx.cheetahgenerator: Generated 8 files for report SeasonsReport in 9.52 seconds
Feb 14 07:00:43 raspberrypi dhcpcd[454]: wlan0: leased 192.168.0.82 for 604800 seconds
Feb 14 07:00:43 raspberrypi avahi-daemon[295]: Joining mDNS multicast group on interface wlan0.IPv4 with address 192.168.0.82.
Feb 14 07:00:43 raspberrypi dhcpcd[454]: wlan0: adding route to 192.168.0.0/24
Feb 14 07:00:43 raspberrypi dhcpcd[454]: wlan0: adding default route via 192.168.0.1
Feb 14 07:00:43 raspberrypi avahi-daemon[295]: New relevant interface wlan0.IPv4 for mDNS.
Feb 14 07:00:43 raspberrypi avahi-daemon[295]: Registering new address record for 192.168.0.82 on wlan0.IPv4.
Feb 14 07:00:48 raspberrypi dhcpcd[454]: wlan0: Router Advertisement from fe81::fa8b:37ff:feb5:cc68
Feb 14 07:00:48 raspberrypi dhcpcd[454]: wlan0: adding address 2a03:8109:9d80:76f8:c2f9:b3c:e216:11d8/64
Feb 14 07:00:48 raspberrypi avahi-daemon[295]: Leaving mDNS multicast group on interface wlan0.IPv6 with address fe81::e927:dd3a:1dcd:c2b5.
Feb 14 07:00:48 raspberrypi avahi-daemon[295]: Joining mDNS multicast group on interface wlan0.IPv6 with address 2a03:8109:9d80:76f8:c2f9:b3c:e216:11d8.
Feb 14 07:00:48 raspberrypi avahi-daemon[295]: Registering new address record for 2a03:8109:9d80:76f8:c2f9:b3c:e216:11d8 on wlan0.*.
Feb 14 07:00:48 raspberrypi avahi-daemon[295]: Withdrawing address record for fe81::e927:dd3a:1dcd:c2b5 on wlan0.
Feb 14 07:00:48 raspberrypi dhcpcd[454]: wlan0: adding route to 2a03:8109:9d80:76f8::/64
Feb 14 07:00:48 raspberrypi dhcpcd[454]: wlan0: confirming prior DHCPv6 lease
Feb 14 07:00:48 raspberrypi dhcpcd[454]: wlan0: adding default route via fe81::fa8b:37ff:feb5:cc68
Feb 14 07:00:49 raspberrypi dhcpcd[454]: wlan0: REPLY6 received from fe81::fa8b:37ff:feb5:cc68
Feb 14 07:00:49 raspberrypi dhcpcd[454]: wlan0: adding address 2a03:8109:9d80:76f8::8842/128
Feb 14 07:00:49 raspberrypi dhcpcd[454]: wlan0: renew in 21600, rebind in 34560, expire in 43200 seconds
Feb 14 07:00:49 raspberrypi avahi-daemon[295]: Registering new address record for 2a03:8109:9d80:76f8::8842 on wlan0.*.
Feb 14 07:00:59 raspberrypi dhcpcd[454]: wlan0: fe81::fa8b:37ff:feb5:cc68 is reachable again
Feb 14 07:00:59 raspberrypi dhcpcd[454]: wlan0: fe81::fa8b:37ff:feb5:cc68 is reachable again
0
2

Old bug coming back to get you, your country code is unset when that /sbin/crda is called which cause the network to fail when it runs.

Process '/sbin/crda' failed with exit code 255

https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=810384 https://bugs.launchpad.net/ubuntu/+source/crda/+bug/1751581

Personally I would thought it fixed by now as the first report is 2016 with the second in 2018. If you create the file as shown in the Debian bug use your wlan0 in the file.

5
  • Thanks! Have looked at the two things suggested on the bugs.debian.org/cgi-bin/bugreport.cgi?bug=810384 I do not have the suggested directory for putting the script on my pi: ls: cannot access '/etc/NetworkManager/dispatcher.d/pre-up.d': No such file or directory After setting the country code in /etc/default/crda I still get the COUNTRY environment variable not set. when running /sbin/crda So still a bit unsure on how to proceed from here.
    – ruben
    Feb 14 at 9:57
  • You can always create the directory and the file in it as root user or sudo used to see if it still works.
    – user130167
    Feb 14 at 17:14
  • Thanks! Have created it manually. /sbin/crda is still failing when running it manually. But will wait for this to happen in the scheduled manner tomorrow to see if it might work for that.
    – ruben
    Feb 15 at 9:00
  • Feb 16 07:04:20 raspberrypi systemd-udevd[21618]: Process '/sbin/crda' failed with exit code 255. Manually adding the file has sadly not fixed the problem.
    – ruben
    Feb 16 at 8:17
  • Damn I had hoped it would work for you too. I am out of ideas unfortunately. Unless creating your own script to set the country code getting it run by cron at say 6:45am will do it for you, anytime just before whatever script it runs fails. If you could track down that script and edit it to set the code before the commands it does that would be the best option. Good luck with it ruben.
    – user130167
    Feb 16 at 14:36

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.