A start job is running for wait for network to be configured. Ubuntu server - GitMasterNikanjam/C_WiKi GitHub Wiki
The message "A start job is running for wait for network to be configured" appears during the boot process of an Ubuntu Server system. It indicates that the system is waiting for network configuration to complete before proceeding further. This typically happens when a network service or configuration is misconfigured, slow, or unable to complete successfully. Below are the key reasons and potential fixes:
Reasons for the Delay
-
Network Configuration Issues:
- Static IP configuration errors in Netplan or other network management tools.
- Misconfigured
gateway
,nameservers
, or missing interface details.
-
DHCP Timeouts:
- The system is waiting for a DHCP server to provide an IP address, but the server is slow or unavailable.
-
Network Services Conflict:
- Multiple active network managers (e.g.,
Netplan
,NetworkManager
,systemd-networkd
) are competing for control.
- Multiple active network managers (e.g.,
-
Nonexistent or Disconnected Interface:
- Configuration is applied to an interface that is not physically present or active.
-
Wait for Network Online
Setting:- The
systemd-networkd-wait-online.service
is enabled and waits indefinitely for the network to come online.
- The
Fixes and Workarounds
1. Check and Update Netplan Configuration
- If using Netplan, review the configuration file (e.g.,
/etc/netplan/50-cloud-init.yaml
) for correctness:network: version: 2 ethernets: enp4s0: dhcp4: false addresses: - 192.168.1.100/24 gateway4: 192.168.1.1 nameservers: addresses: [8.8.8.8, 8.8.4.4]
- Apply changes using:
sudo netplan apply
2. Reduce Timeout for Waiting
- Modify the timeout for the
systemd-networkd-wait-online.service
:sudo systemctl edit systemd-networkd-wait-online.service
- Add the following lines:
[Service] TimeoutStartSec=10
- Reload the systemd daemon:
sudo systemctl daemon-reload sudo systemctl restart systemd-networkd
Wait for Network Online
(Optional)
3. Disable - If the network is not critical for boot, disable the
systemd-networkd-wait-online.service
:sudo systemctl disable systemd-networkd-wait-online.service
4. Ensure Correct Interface Naming
- Verify that the interface name in the configuration matches the actual name:
ip link show
5. Check for DHCP Issues
- Confirm that the DHCP server is operational and reachable.
- Test DHCP manually:
sudo dhclient -v <interface_name>
6. Monitor Logs for Clues
- Check logs to identify specific issues:
journalctl -xe
Temporary Boot Bypass
If fixing the above is not immediately possible, you can bypass the waiting period:
- Press
Ctrl+C
during the boot process to skip the job. - Once booted, troubleshoot the network issue from the terminal.
If you provide your specific network configuration or any error messages, I can guide you more precisely!
Try This!
Open netplan configuration file at /etc/netplan/
:
# This file is generated from information provided by the datasource. Changes
# to it will not persist across an instance reboot. To disable cloud-init's
# network configuration capabilities, write a file
# /etc/cloud/cloud.cfg.d/99-disable-network-config.cfg with the following:
# network: {config: disabled}
network:
ethernets:
eno1:
dhcp4: true
optional: true
enp2s0:
dhcp4: true
optional: true
usb0:
dhcp4: true
optional: true
version: 2
Add : optional: true
maybe solve problem waiting.
- You may need: Add
network: {config: disabled}
to/etc/cloud/cloud.cfg.d/99-disable-network-config.cfg
file. - You may need: Config netplan in safe mode operation of OS.