3

When i want to boot up my laptop it shows this error to me

[FAILED] Failed to start Dispatcher daemon for systemd-networkd

and this is what happens

Please help me.

5

Your system is not freezing during the boot process, it's entered a waiting state for the network devices to be completely configured before continuing on. The ultimate fix will come from an examination of of the configuration files in /etc/systemd/network and the service logs as revealed by journalctl -xe | grep networkd, focusing your attention on any links whose status in the report from networkctl status -a is not listed as "configured". This has been known to happen when IPv6 is unavailable or misconfigured, but also for various other reasons.

You should reboot the system in recovery mode via your bootloader (GRUB, rEFInd, etc.) and select the root option from the menu that appears. From there you can examine the system with the above-mentioned commands and/or enable debugging logs for the service by creating a new directory with mkdir /etc/systemd/system/systemd-networkd.service.d and then creating a new file in it called override.conf (e.g. sudoedit /etc/systemd/system/systemd-networkd.service.d/override.conf) with the following contents:

[Service]
Environment=SYSTEMD_LOG_LEVEL=debug

You can test the success of your modifications to the files in /etc/systemd/network while still in recovery mode using the command /usr/lib/systemd/systemd-networkd-wait-online && echo $?. If you've fixed the problem the output will be 0. Failing all else, you can disable the service entirely with sudo systemctl disable systemd-netword-wait-online.service


Relevant man pages:

1
  • 1
    I did what you said(i disabled systemctl)but it didn't work. – Stefanx Mar 15 '20 at 10:41
4

It sounds as if you have >1 systemd.network(5) configuration file in /etc/systemd/network (or have [Match] section specifying >1 interface with a wildcard) with none set with the RequiredForOnline=false directive in the [Link] section. In that case, systemd-networkd-wait-online.service will expect all the systemd-networkd managed interfaces to reach a routable operational state.

Though setting that directive will also make it ignored by systemd-networkd-wait-online.service entirely, which is also probably not what you want. If you don't care about ordering against the network-online.target, then you might as well disable and/or mask the unit.

If you would prefer to retain the advantages of ordering dependencies against network-online.target, then the easiest way around this that I've found is to simply use the --any switch. Either create the file /etc/systemd/system/systemd-networkd-wait-online.service.d/override.conf or use systemctl edit systemd-networkd-wait-online.service (which will also create the same file) and include these lines...

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

A subsequent systemctl daemon-reload and systemctl restart systemd-networkd-wait-online.service should tell you immediately whether it worked or not.

Alternatively, you can use the --interface= and/or --ignore= switches with systemd-networkd-wait-online. These may be used in place of, or in conjunction with, the --any switch shown above. If used with the --any switch, it will only consider those interfaces passed to --interface=, or not explicitly disregarded with --ignore=, when determining whether the machine has reached an online state.

2
  • Why do we need ExecStart twice? – daniel451 Nov 1 '20 at 5:46
  • 1
    It is a "drop-in snippet" to add to or replace directives in the service file. Adding is as simple as including the unit section(s) and the directive(s) you wish to set, but to replace a directive that may only used once requires "clearing" the directive first. So the first one blanks out the existing ExecStart= setting, and the second is what we are replacing it with. – WonderWoofy Nov 2 '20 at 16:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.