systemd-networkd-wait-online failure
Solution 1
Basically the same answer as @alexei, but the option --any
allows you to wait for any interface to come online. You may also benefit from the --timeout
option.
See the documentation for more information.
sudo systemctl edit systemd-networkd-wait-online.service
and add
[Service]
ExecStart=
ExecStart=/usr/lib/systemd/systemd-networkd-wait-online --any
The reason their is an extra blank ExecStart=
, is to clear the existing service entry, the second one sets to a new value.
Solution 2
It might be due to systemd-networkd-wait-online utility waiting for interfaces that are not going to come up (e.g. ethernet ports with unplugged cables) in some corner cases, like having two ethernet interfaces.
In my case, the workaround was to edit the service to pass --ignore
arguments to the utility for the interfaces I don't want to wait for.
sudo systemctl edit systemd-networkd-wait-online.service
Add these lines:
[Service]
ExecStart=
ExecStart=/usr/lib/systemd/systemd-networkd-wait-online --ignore=enp0s31f6
Related videos on Youtube
Fabio
Updated on September 18, 2022Comments
-
Fabio over 1 year
The default openvpn-server configuration file depends on systemd-networkd-wait-online, which times out with error:
systemd-networkd-wait-online[279]: Event loop failed: Connection timed out
My system has only 2 interfaces:
- lo, which is ignored
- eth0, is up and running and perfectly configured
Why does this times out? Is it a systemd bug?
Fabio
-
Admin over 5 yearsThere is a bug report filed at: github.com/systemd/systemd/issues/6441. In brief, one cause which triggers this bug is disabling the ipv6 stack.
-
Admin over 3 yearsThis may help to solve your problem: A start job is running for wait for network to be configured.