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?



5 Answers 5


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

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.


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:

ExecStart=/usr/lib/systemd/systemd-networkd-wait-online --ignore=enp0s31f6

Just adding to this that you can also specify a specific interface for systemd-networkd-wait-online to wait for using

ExecStart=/lib/systemd/systemd-networkd-wait-online --interface=eth0

This will cause the service to ignore all other interfaces.



In case you have configured network in /etc/network/interfaces, NOT in /etc/systemd/network, then you can simply clean /etc/systemd/network folder:

rm /etc/systemd/network/*

In my case there was automatically created file eth0.network, which had instruction to configure eth0 by DHCP. But since I configured static IP in /etc/network/interfaces, I simply removed eth0.network from /etc/systemd/network. Now system boots quickly.


systemd-networkd-wait-online is looking up configurations of the interfaces of systemd-networkd. so in this case instead of modifying the service file itself one can set an RequiredForOnline or ActivationPolicy flag in the interfaces' systemd.network configuration file. E.g.




You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .