Debian 13 LXC await network timeout

Lombra

New Member
Feb 2, 2025
11
1
3
Hi,

I created a Debian 13 container from a template built using the Debian Appliance Builder. When installing docker.io (and on every subsequent boot), the service startup is delayed by two minutes as it waits for systemd-networkd-wait-online to time out. This seems to happen due to the following file existing:

Code:
/etc/systemd/system/network-online.target.wants/systemd-networkd-wait-online.service

I don't know exactly where the blame should lie, but as far as I understand, the timing out is expected when using /etc/network/interfaces, so the file shouldn't be there in the first place? It is also not present in the PVE-provided Debian 12 template, does not get added when upgrading that to Debian 13, and is also not present in a minimal Debian 13 net install VM.

I can probably just remove the file and be on my way, but this seems incorrect somehow.

Code:
Aug 18 16:27:16 wolf7 systemd[1]: Starting docker.socket - Docker Socket for the API...
Aug 18 16:27:16 wolf7 systemd[1]: Starting ifupdown-wait-online.service - Wait for network to be configured by ifupdown...
Aug 18 16:27:16 wolf7 systemd[1]: Starting systemd-networkd-wait-online.service - Wait for Network to be Configured...
Aug 18 16:27:16 wolf7 systemd[1]: Listening on docker.socket - Docker Socket for the API.
Aug 18 16:27:16 wolf7 systemd[1]: Finished ifupdown-wait-online.service - Wait for network to be configured by ifupdown.
Aug 18 16:29:16 wolf7 systemd-networkd-wait-online[1155]: Timeout occurred while waiting for network connectivity.
Aug 18 16:29:16 wolf7 systemd[1]: systemd-networkd-wait-online.service: Main process exited, code=exited, status=1/FAILURE
Aug 18 16:29:16 wolf7 systemd[1]: systemd-networkd-wait-online.service: Failed with result 'exit-code'.
Aug 18 16:29:16 wolf7 systemd[1]: Failed to start systemd-networkd-wait-online.service - Wait for Network to be Configured.
Aug 18 16:29:16 wolf7 systemd[1]: Reached target network-online.target - Network is Online.
Aug 18 16:29:16 wolf7 systemd[1]: Starting docker.service - Docker Application Container Engine...
[/icode]
 
Last edited:
I just encountered this exact behaviour on our machines aswell while using the default Proxmox LXC Debian 13 template.

systemd-networkd-wait-online.service didnt exist in bookworm images.

What i did to solve this problem was:

1. systemctl edit systemd-networkd-wait-online.service

2. Add the following as override

Code:
[Service]
ExecStart=
ExecStart=/usr/lib/systemd/systemd-networkd-wait-online --interface=eth0 --timeout=30

I yet have to discover why the system runs into timeout. When i force networkd to only wait for eth0 it works just fine.
Checking with networkctl while the system waits for interfaces to become online shows that eth0 is in "routable" mode, so up and running.

AFAIK systemd-networkd-wait-online should be disabled by default as Proxmox uses ifupdown2 and /etc/network/interfaces and not systemd for LXC.
 
Last edited:
I have same problam.
Code:
root@ai:~# systemd-analyze blame
5min 1.141s ifupdown-wait-online.service
      776ms docker.service
      703ms postfix.service
      266ms networking.service
      239ms udisks2.service
      228ms user@0.service
      222ms accounts-daemon.service
      212ms lm-sensors.service
      150ms polkit.service
      135ms podman-auto-update.service
      133ms systemd-networkd.service
      103ms containerd.service
       94ms systemd-logind.service
       73ms ssh.service
       67ms podman-restart.service
       57ms avahi-daemon.service
       54ms systemd-tmpfiles-setup.service
       49ms systemd-journald.service
       41ms systemd-journal-flush.service
       37ms keyboard-setup.service
       34ms systemd-tmpfiles-setup-dev.service
       34ms nftables.service
       32ms user-runtime-dir@0.service
       30ms systemd-networkd-persistent-storage.service
       27ms dev-hugepages.mount
       26ms nvidia-persistenced.service
       26ms dev-mqueue.mount
       25ms systemd-user-sessions.service
       24ms run-lock.mount
       23ms console-setup.service
       23ms tmp.mount
       22ms systemd-network-generator.service
       22ms ifupdown-pre.service
       21ms systemd-tmpfiles-setup-dev-early.service
       21ms systemd-remount-fs.service
       20ms systemd-sysctl.service
       18ms systemd-udev-load-credentials.service
       18ms docker.socket
       15ms nvidia-cdi-refresh.service
       15ms netavark-dhcp-proxy.service
       11ms postfix-resolvconf.service
       10ms podman.service

I disable this service, and lxc running as well.
Bash:
systemctl disable ifupdown-wait-online.service