You are not logged in.
Hi,
one day after booting and logging in with my display manager I got presented with a wait for systemd-networkd-wait-online to finish "getting up". It gets timed out after a minute or two, so I can get a working system, but it for sure is annoying as hell.
Checking networkctl shows that indeed one of interfaces is stuck configuring.
➜ ~ networkctl
IDX LINK TYPE OPERATIONAL SETUP
1 lo loopback carrier unmanaged
2 eno2 ether no-carrier configuring
4 wlan0 wlan routable configured
5 lxcbr0 bridge no-carrier unmanaged
4 links listed.
➜ ~ networkctl status eno2
● 2: eno2
Link File: /usr/lib/systemd/network/99-default.link
Network File: /etc/systemd/network/20-wired.network
State: no-carrier (configuring)
Online state: offline
Type: ether
Path: pci-0000:00:1f.6
Driver: e1000e
Vendor: Intel Corporation
Model: Ethernet Connection (10) I219-LM
Alternative Names: enp0s31f6
enxcc483a75d40d
Hardware Address: cc:48:3a:75:d4:0d (Dell Inc.)
MTU: 1500 (min: 68, max: 9000)
QDisc: fq_codel
IPv6 Address Generation Mode: eui64
Number of Queues (Tx/Rx): 1/1
Auto negotiation: yes
Port: tp
Activation Policy: up
Required For Online: yes
I could believe it is a desired behaviour since I don't really use the ethernet interface (it's a laptop), but it used to be working. I'm not entirely sure but 90% it started to happen after I rebooted after installing LXC. I tried uninstalling it later at some point, without any effect though.
Disabling the service is an option, but I am just curious what I am missing here.
I'm more than happy to provide any extra information, here's some more I think might be relevant:
➜ ~ cd /etc/systemd/network
➜ network cat 20-wired.network
[Match]
Name=eno2
[Link]
RequiredForOnline=routable
[Network]
DHCP=yes
➜ network cat 25-wireless.network
[Match]
Name=wlan0
[Link]
RequiredForOnline=routable
[Network]
DHCP=yes
IgnoreCarrierLoss=3s
➜ network cat 50-usb_tethering.network
[Match]
Name=enp0s20f0u1
[Network]
DHCP=yes
➜ network sudo journalctl -b -u systemd-networkd-wait-online
May 28 22:54:24 moo111 systemd[1]: Starting Wait for Network to be Configured...
May 28 22:56:24 moo111 systemd-networkd-wait-online[550]: Timeout occurred while waiting for network connectivity.
May 28 22:56:24 moo111 systemd[1]: systemd-networkd-wait-online.service: Main process exited, code=exited, status=1/FAILURE
May 28 22:56:24 moo111 systemd[1]: systemd-networkd-wait-online.service: Failed with result 'exit-code'.
May 28 22:56:24 moo111 systemd[1]: Failed to start Wait for Network to be Configured.
➜ network sudo journalctl -b -u systemd-networkd -p 6
May 28 22:54:23 moo111 systemd[1]: Starting Network Configuration...
May 28 22:54:24 moo111 systemd-networkd[423]: lo: Link UP
May 28 22:54:24 moo111 systemd-networkd[423]: lo: Gained carrier
May 28 22:54:24 moo111 systemd[1]: Started Network Configuration.
May 28 22:54:24 moo111 systemd-networkd[423]: eth0: Interface name change detected, renamed to eno2.
May 28 22:54:24 moo111 systemd-networkd[423]: eno2: Configuring with /etc/systemd/network/20-wired.network.
May 28 22:54:24 moo111 systemd-networkd[423]: eno2: Link UP
May 28 22:54:25 moo111 systemd-networkd[423]: wlan0: Link UP
May 28 22:54:25 moo111 systemd-networkd[423]: wlan0: Configuring with /etc/systemd/network/25-wireless.network.
May 28 22:54:26 moo111 systemd-networkd[423]: wlan0: Connected WiFi access point: grzanka home (94:2a:6f:da:3d:f1)
May 28 22:54:26 moo111 systemd-networkd[423]: wlan0: Gained carrier
May 28 22:54:26 moo111 systemd-networkd[423]: wlan0: DHCPv4 address 10.0.1.3/16, gateway 10.0.0.1 acquired from 10.0.0.1
May 28 22:54:28 moo111 systemd-networkd[423]: wlan0: Gained IPv6LL
May 28 22:56:24 moo111 systemd-networkd[423]: lxcbr0: Link UP
and systemd-networkd logs with debug are here: https://pastebin.com/MhSJv7np
Last edited by moojek (2025-05-29 20:11:50)
Offline
"RequiredForOnline=no"?
Offline
[...] but I am just curious what I am missing here.
You instruct systemd-networkd to acquire an IP address (eno2) via DHCP and wait for it to have one ("RequiredForOnline=routable") while no cable is attached ("no carrier").
Offline
I wonder though why it started to behave like that out of the blue (I don't remember changing wired interface configuration file). Also when I have my wireless interface not connected it also shows no carrier and is configured:
➜ ~ networkctl status wlan0
● 4: wlan0
Link File: /usr/lib/systemd/network/80-iwd.link
Network File: /etc/systemd/network/25-wireless.network
State: no-carrier (configured)
Online state: offline
Type: wlan
Path: pci-0000:00:14.3
Driver: iwlwifi
Vendor: Intel Corporation
Model: Comet Lake PCH-LP CNVi WiFi (Dual Band Wi-Fi 6(802.11ax) AX201 160MHz 2x2 [Harrison Peak])
Hardware Address: 3c:9c:0f:aa:3b:ce (Intel Corporate)
MTU: 1500 (min: 256, max: 2304)
QDisc: noqueue
IPv6 Address Generation Mode: eui64
Wi-Fi access point: (null) (00:00:00:00:00:00)
Number of Queues (Tx/Rx): 1/1
Address: fe80::3e9c:fff:feaa:3bce
Activation Policy: up
Required For Online: yes
DHCPv6 Client DUID: DUID-EN/Vendor:0000ab116780e9122fecb5b3
Offline
But that's after systemd has given up on the timeout?
What might have changed is that something else in the boot process now actually cares about the network state (eg. your DM, you can check
systemd-analyze critical-chain
Ether way, even if it has worked in the past that merely means that there was a bug in the past - the configuration requires the NIC to be routable to consider the system "online" and you don't even have a carrier.
So the solution is to not require the NIC to consider the system online.
Offline
Okay, so I checked the dependencies thoroughly and it turned out that the thing wanting systemd-networkd-wait-online was reflector.service that I enabled the same day I installed lxc, which caused my confusion. I now think it isn't really a good idea to have it enabled, but for anyone wondering you can apply --any option to systemd-networkd-wait-online, then it will only require one interface to be configured.
For further learn - where do I find information on what is the requirement for interface to become configured?
Thank you for help and sorry it turned out to be such a silly mistake.
Offline
where do I find information on what is the requirement for interface to become configured?
https://man.archlinux.org/man/networkctl.1.en#COMMANDS
Ftr, #4 is actually wlan0 but the troublesome NIC is eno2, so unless the context/problem has changed, it's not suggesting that the stalling NIC has at some point been "configured".
Offline
I'm aware that I sent the status of the wlan0 in #4, it was merely a response to the -thc's post, which in hindsight also made little sense. What I had in mind was that wlan0 is also in no-carrier state, but is configured, contrary to Ethernet interface where it caused problem.
Offline
I did not know that "systemd-networkd-wait-online" is active by default but only "really" triggered by a service unit that requires this state (in your case reflector).
Your "before" state did not trigger "systemd-networkd-wait-online" and the "RequiredForOnline=routable" statements were simply irrelevant.
After activating reflector they became relevant and created the 2 minute timeout waiting for an Ethernet device that couldn't reach this state. Seth's suggestion would have worked BTW - "systemd-networkd-wait-online.service" would have ignored the Ethernet device.
I don't know why your "networkctl" status shows "no carrier" for wlan0.
Without an attached cable your Ethernet device (truthful "no carrier") was the cause - triggered by reflector.
Offline