Systemd-Networkd-Wait-Online Timeout on Boot

Hi,

I’m getting a “timeout” (if that’s the correct word) when I boot or reboot my Ubuntu Server (latest) I’m configuring.

Said timeout appears to relate to the systemd-networkd-wait-online and I found an article that talks about it (I can’t post links unfortunately) which told me to:

  • Check which one is active using the systemctl command.
  • Disable said service.
  • modify its unit file with systemctl edit.

I followed the article through with no luck, nothing seems to stop the timeout… oddly, when I use the command “systemctl edit systemd-networkd-wait-online.service” the system doesn’t seem to retain my changes which might account for my inability to stop the timeout i.e. I use that command and then if I use it again (immediately) I can’t see any of the changes I made.

This isn’t a critical error, more irritating on account of it ends after a couple of minutes but any ideas would be of interest :slight_smile:

Thanks

James

1 Like

@JamesCRocks posting web links limitation is due to the built-in Trust Level system. Read more about that here: Our Trust Level System


If you are on Ubuntu 24.04 LTS systemd-networkd-wait-online.service waits until network links are “online,” and by default it waits for all links known to systemd-networkd. If one NIC is unplugged or slow to get DHCP, boot stalls for up to 120 seconds.

You can see which “wait-online” unit exists with:

systemctl status systemd-networkd-wait-online.service || true
systemctl status NetworkManager-wait-online.service   || true

The best approach is probably to make wait-online succeed faster. Create a drop-in that waits for any interface or a specific one, with a short timeout.

sudo systemctl edit systemd-networkd-wait-online.service

You should delete everything below ### Lines below this comment will be discarded and replace it with your custom override, something like this:

[Service]
ExecStart=
ExecStart=/lib/systemd/systemd-networkd-wait-online --any --timeout=5

Ssave and exit nano.

Then do:

sudo systemctl daemon-reload
sudo systemctl restart systemd-networkd-wait-online.service

Let us know if that works.

I got quite a few errors but yeah it booted quickly even if I saw an error flash up at the same point :slight_smile:

I’m still able to access it remotely so maybe that last isn’t an issue?

Thanks

James

1 Like

Cool. :smiling_face_with_sunglasses: Feel free to paste any errors here so we can have a look

Is there a log or something somewhere I can find the errors?

Thanks :slight_smile:

James