systemd-networkd-wait-online.service causing Artful to take over 2 minutes to boot, but Apport says package is not installed

5,039

Solution 1

Existing answers have suggested editing files in /lib in place or copying them to /etc. I recommend doing the following:

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

Then you can make modifications in the file, as described in the existing answers:

ExecStart=/lib/systemd/systemd-networkd-wait-online --timeout 1

This way systemd will take care of the files for you and it will survive upgrades. If you need to restore the default behavior you can delete the respective file in /etc/systemd/system/.

Solution 2

Same problem here with Artful.

2min 52ms systemd-networkd-wait-online.service

As a workaround you can add a timeout for the service. To do that edit the file /lib/systemd/system/systemd-networkd-wait-online.service and adjust the line that starts the service:

ExecStart=/lib/systemd/systemd-networkd-wait-online --timeout 1

Setting the timeout to 1 doesn't seem to have any implications as there's another service with the exact same task (NetworkManager-wait-online.service).

Solution 3

You can make ExecStart=/lib/systemd/systemd-networkd-wait-online --timeout 1 permanent by copying the modified systemd-networkd-wait-online.service file from /lib/systemd/system/ to /etc/systemd/system/ directory, using the following command.

sudo cp /lib/systemd/system/systemd-networkd-wait-online.service /etc/systemd/system/

Solution 4

Most people don't even need to wait for network to be up when booting. In this case you can simply disable the waiting:

The above link explains what the service does and tells you how to disable it, as most users without an IT department would want to do.

Share:
5,039

Related videos on Youtube

Luke Andersojn
Author by

Luke Andersojn

Updated on September 18, 2022

Comments

  • Luke Andersojn
    Luke Andersojn almost 2 years

    Symptons same on every release after 16.04.3.

    At boot, system hangs on the Ubuntu screen with 4 flashing dots for over 2 minutes.

    Ran systemd blame which indicated systemd-networkd-wait-online.service took 1 minute and 38 seconds to run and NetworkManager-wait-online.service took 10 seconds to run.

    Ran ubuntu-bug systemd-networkd-wait-online.service which returns that the bug cannot be reported because it concerns a package that is not installed.

    Without Apport working, I am unsure how to file the bug on Launchpad.

    • Redbob
      Redbob almost 7 years
      Doing an upgrade from Lts to beta release could not result to a happy-end.
    • Luke Andersojn
      Luke Andersojn almost 7 years
      I'm just testing, so that I can notify of bugs. 16.04 was a bug filled release, rather 18.04 not be the same.
    • Redbob
      Redbob almost 7 years
      So you made a clean install of 17.10?
  • Cynplytholowazy
    Cynplytholowazy almost 7 years
    Why adding a timeout work? Also you are using artful, which is not specific to the version specified, which is xenial.
  • Eric Keller
    Eric Keller over 6 years
    sorry for the delay of my answer... I did add a timeout since I do not want to wait 2 min on bootup.
  • Armin
    Armin almost 6 years
    Works like charm!
  • Armin
    Armin over 5 years
    Btw. after I've performed a apt-get dist-upgrade the contents in /lib/systemd/system/systemd-networkd-wait-online.service has been restored. The --timeout 1 was gone. So this workaround is not update-safe.
  • Daniel
    Daniel over 3 years
    what is the unit of 1 in --timeout. Is it 1 second?