systemd-networkd-wait-online failure

10,404

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
Share:
10,404

Related videos on Youtube

Fabio
Author by

Fabio

Updated on September 18, 2022

Comments

  • Fabio
    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