Troubleshooting systemd-networkd-wait-online.service
The delay caused by systemd-networkd-wait-online.service
typically indicates that the service is waiting for a network interface to reach a fully operational state, but it is not succeeding within the specified time limit. Here are some common causes:
Common Causes
-
Misconfigured Network Interfaces: The service might be waiting for a network interface that is misconfigured or does not have a proper network connection (e.g., no IP address or link).
-
Static IP Configuration Issues: If you have a static IP configuration and the gateway or DNS server is unreachable, it could prevent the service from confirming network readiness.
-
Disabled or Missing Interface: The service may be trying to wait for a network interface that is disabled, missing, or otherwise unavailable.
-
DHCP Timeout: If your system relies on DHCP to configure the network and the DHCP server is unresponsive, the service will delay until it times out.
-
Multiple Interfaces: On systems with multiple network interfaces, a conflict or misconfiguration can cause delays.
How to Debug and Fix
1. Check Network Status
Run the following command to check the status of network interfaces:
2. Inspect Logs
Check the journal logs for systemd-networkd
for more details:
3. Disable the Service
If you do not require systemd-networkd-wait-online
, you can disable it:
4. Adjust Timeout
You can configure the timeout in /etc/systemd/system/network-online.target.wants/systemd-networkd-wait-online.service
by modifying the TimeoutStartSec
parameter.
5. Review Configuration
Verify the configuration in /etc/systemd/network/
or /etc/network/interfaces
(depending on your system) for accuracy.
6. Test Connectivity
Ensure the network connection is functional with:
By examining these areas, you should be able to identify the root cause of the delay and resolve it.