You are not logged in.

#1 2023-08-19 09:07:55

justdanyul
Member
Registered: 2011-09-29
Posts: 137

Confused to why my fix worked (services not starting during boot)

Hi all,

I recently had a problem with some systemd services not starting up doing boot (smbd and nmdb).

After a bit of digging, it turned out that the culprit was systemd-networkd-wait-online.service ,this failed during boot, which I suspect means that I newer enter the network-online target , which smb.service required.

Installing networkmanager enabling NetworkManager-wait-online.service and disabling systemd-networkd-wait-online.service fixed the problem.

Now, the reason for this post is im confused why? Shouldn't systemd on its own be able to manage my network?

Offline

#2 2023-08-19 09:27:14

jonno2002
Member
Registered: 2016-11-21
Posts: 868

Re: Confused to why my fix worked (services not starting during boot)

man systemd-networkd-wait-online

DESCRIPTION
       systemd-networkd-wait-online is a oneshot system service (see systemd.service(5)), that waits for the network to be configured. By default, it will wait for all links it is aware of and which are managed by systemd-
       networkd.service(8) to be fully configured or failed, and for at least one link to be online. Here, online means that the link's operational state is equal or higher than "degraded". The threshold can be configured by
       --operational-state= option.

       The service systemd-networkd-wait-online.service invokes systemd-networkd-wait-online without any options. Thus, it waits for all managed interfaces to be configured or failed, and for at least one to be online.

       The service systemd-networkd-wait-online@.service takes an interface name, and invokes systemd-networkd-wait-online with -i and the specified interface name. Thus, wait for the specified interface to be configured and
       online. For example, systemd-networkd-wait-online@eth0.service waits for eth0 to be configured by systemd-networkd and online.

were you using systemd-networkd to manage your connection or somthing else ? it only works with systemd-networkd connections.
i just tried running:

/usr/lib/systemd/systemd-networkd-wait-online

which just sits there doing nothing because im not using systemd-networkd, whereas:

/usr/bin/nm-online 
Connecting...............   30s [online]

works perfect due to me using networkmanager.

hope that makes sense.

Offline

#3 2023-08-19 12:07:28

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 76,107

Re: Confused to why my fix worked (services not starting during boot)

jonno2002's excerpt kinda skipped the most crucial bit that the way-online manpage only hints at wink

https://bbs.archlinux.org/viewtopic.php … 0#p2107330

Online

#4 2023-08-20 15:12:15

justdanyul
Member
Registered: 2011-09-29
Posts: 137

Re: Confused to why my fix worked (services not starting during boot)

jonno2002 wrote:

hope that makes sense.

It did indeed.

Offline

Board footer

Powered by FluxBB