Skip to content

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

  1. 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).

  2. 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.

  3. Disabled or Missing Interface: The service may be trying to wait for a network interface that is disabled, missing, or otherwise unavailable.

  4. 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.

  5. 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:

networkctl status

2. Inspect Logs

Check the journal logs for systemd-networkd for more details:

journalctl -u systemd-networkd

3. Disable the Service

If you do not require systemd-networkd-wait-online, you can disable it:

sudo systemctl disable systemd-networkd-wait-online.service

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:

ping -c 4 8.8.8.8

By examining these areas, you should be able to identify the root cause of the delay and resolve it.