Systemd-networkd-wait-online Timeout on rpi3 and rpi4

systemd-networkd-wait-online is failing on my raspberry pi 3 or raspberry pi 4
If I boot or reboot, sometimes the Devices are reacheable sometimes not.

Any help to fix this issues.

Other Informations:
raspberry pi 3 run as Pi-hole from AUR.
raspberry pi 4 run Docker Services (5 containers)

Both are connected via a POE-Adapter.

× systemd-networkd-wait-online.service - Wait for Network to be Configured
     Loaded: loaded (/usr/lib/systemd/system/systemd-networkd-wait-online.service; enabled; preset: enabled)
     Active: failed (Result: exit-code) since Sat 2024-02-10 17:54:22 CET; 1min 32s ago
       Docs: man:systemd-networkd-wait-online.service(8)
   Main PID: 1728 (code=exited, status=1/FAILURE)
        CPU: 22ms


Feb 10 17:52:22 raspberrypi3 systemd[1]: Starting Wait for Network to be Configured...
Feb 10 17:54:22 raspberrypi3 systemd-networkd-wait-online[1728]: Timeout occurred while waiting for network connectivity.
Feb 10 17:54:22 raspberrypi3 systemd[1]: systemd-networkd-wait-online.service: Main process exited, code=exited, status=1/FAILURE
Feb 10 17:54:22 raspberrypi3 systemd[1]: systemd-networkd-wait-online.service: Failed with result 'exit-code'.
Feb 10 17:54:22 raspberrypi3 systemd[1]: Failed to start Wait for Network to be Configured.
$ networkctl list
IDX LINK TYPE     OPERATIONAL SETUP
  1 lo   loopback carrier     unmanaged
  2 eth0 ether    routable    unmanaged

2 links listed.
● systemd-networkd.service - Network Configuration
     Loaded: loaded (/usr/lib/systemd/system/systemd-networkd.service; enabled; preset: enabled)
     Active: active (running) since Thu 2023-12-14 14:57:20 CET; 1 month 27 days ago
TriggeredBy: ● systemd-networkd.socket
       Docs: man:systemd-networkd.service(8)
             man:org.freedesktop.network1(5)
   Main PID: 255 (systemd-network)
     Status: "Processing requests..."
      Tasks: 1 (limit: 824)
   FD Store: 0 (limit: 512)
        CPU: 204ms
     CGroup: /system.slice/systemd-networkd.service
             └─255 /usr/lib/systemd/systemd-networkd

Feb 10 17:22:51 raspberrypi3 systemd-networkd[255]: eth0: Link UP
Feb 10 17:22:56 raspberrypi3 systemd-networkd[255]: eth0: Gained carrier
Feb 10 17:22:58 raspberrypi3 systemd-networkd[255]: eth0: Gained IPv6LL
Notice: journal has been rotated since unit was started, output may be incomplete.
● systemd-networkd.service - Network Configuration
     Loaded: loaded (/usr/lib/systemd/system/systemd-networkd.service; enabled; preset: enabled)
     Active: active (running) since Thu 2023-12-14 14:57:19 CET; 1 month 27 days ago
TriggeredBy: ● systemd-networkd.socket
       Docs: man:systemd-networkd.service(8)
             man:org.freedesktop.network1(5)
   Main PID: 307 (systemd-network)
     Status: "Processing requests..."
      Tasks: 1 (limit: 8800)
   FD Store: 0 (limit: 512)
        CPU: 269ms
     CGroup: /system.slice/systemd-networkd.service
             └─307 /usr/lib/systemd/systemd-networkd

Feb 10 16:18:03 raspberrypi4 systemd-networkd[307]: veth62d77b3: Gained carrier
Feb 10 16:18:03 raspberrypi4 systemd-networkd[307]: veth91a257f: Gained IPv6LL
Feb 10 16:18:03 raspberrypi4 systemd-networkd[307]: veth9535af3: Gained IPv6LL
Feb 10 16:18:03 raspberrypi4 systemd-networkd[307]: vethc1f0217: Gained IPv6LL
Feb 10 16:18:03 raspberrypi4 systemd-networkd[307]: br-096d8d74616c: Gained IPv6LL
Feb 10 16:18:03 raspberrypi4 systemd-networkd[307]: br-758cb345e9f9: Gained IPv6LL
Feb 10 16:18:04 raspberrypi4 systemd-networkd[307]: veth62d77b3: Gained IPv6LL
Feb 10 16:18:05 raspberrypi4 systemd-networkd[307]: vethc1f0217: Gained IPv6LL
Feb 10 16:18:05 raspberrypi4 systemd-networkd[307]: veth6d8e12b: Gained IPv6LL
Feb 10 16:18:05 raspberrypi4 systemd-networkd[307]: veth91a257f: Gained IPv6LL

adding ipv4only on both Devices to /etc/dhcpcd.conf solved my issue.

$ cat /etc/dhcpcd.conf
static blabla
ipv4only
1 Like

If you are only going to use ipv4 then you can disable IPv6 other ways.
(and for more than dhcp)
Such as ipv6.disable=1 boot option.

https://wiki.archlinux.org/title/IPv6#Disable_IPv6

1 Like

Thank you @cscs this was the last configuration that I have to setup.
So not issues anymore with systemd-networkd-wait-online

This topic was automatically closed 36 hours after the last reply. New replies are no longer allowed.