5 minute delay

Airw0lf

Active Member
Apr 11, 2021
83
5
28
it-visibility.net
Team,

I'm trying to build a LXC container with a few network services like docker, pihole and chrony.
The build went as expected. However, after a reboot, there is a little over 5 minute delay when starting these services.
Using debug mode of pihole reveiled the following message:

Jun 26 15:12:32 morpheus systemd[1]: ifupdown-wait-online.service: Main process exited, code=exited, status=1/FAILURE Jun 26 15:12:32 morpheus systemd[1]: ifupdown-wait-online.service: Failed with result 'exit-code'. Jun 26 15:12:32 morpheus systemd[1]: Failed to start Wait for network to be configured by ifupdown. Jun 26 15:12:32 morpheus systemd[1]: Reached target Network is Online.
Once this stage is reached all services mentioned previously are started immediately.

Anyone an idea what might be happening here?
And what service might be causing this?

The LXC container is running on the latest version of Debian 11.
Proxmox is running on the latest version 7.

Within the LXC container there is no DHCP - all interfaces have static IP adresses.

In addition IPv6 is turned off for the host as well as the LXC container.
This is done by putting the the following 3 lines in sysctl.conf:
net.ipv6.conf.all.disable_ipv6 = 1 net.ipv6.conf.default.disable_ipv6 = 1 net.ipv6.conf.lo.disable_ipv6 = 1


Many thanks - Will
 
Last edited:
Sounds like the network is being delayed and times out after 5 min. Should be able to see it with
Code:
systemd-analyze blame
Good luck
 
  • Like
Reactions: Airw0lf
Sounds like the network is being delayed and times out after 5 min. Should be able to see it with
Code:
systemd-analyze blame
Good luck

Thank you.

When I run this on 2 different LXC containers (one with Debian en one with Ubuntu), the Ubuntu container has 13 seconds for systemd-networkd-wait-online.service. While the Debian container has 5min for ifupdown-wait-online.service.

Any idea where these differences are coming from?
Is their a way for figuring out what it is that they are waiting for?
 
Sorry I am not familiar enough with containers to help. At least you know what to look at. Maybe the network config?
 
  • Like
Reactions: Airw0lf
Team,

I'm trying to build a LXC container with a few network services like docker, pihole and chrony.
The build went as expected. However, after a reboot, there is a little over 5 minute delay when starting these services.
Using debug mode of pihole reveiled the following message:

Jun 26 15:12:32 morpheus systemd[1]: ifupdown-wait-online.service: Main process exited, code=exited, status=1/FAILURE Jun 26 15:12:32 morpheus systemd[1]: ifupdown-wait-online.service: Failed with result 'exit-code'. Jun 26 15:12:32 morpheus systemd[1]: Failed to start Wait for network to be configured by ifupdown. Jun 26 15:12:32 morpheus systemd[1]: Reached target Network is Online.
Once this stage is reached all services mentioned previously are started immediately.

Anyone an idea what might be happening here?
And what service might be causing this?

The LXC container is running on the latest version of Debian 11.
Proxmox is running on the latest version 7.

Within the LXC container there is no DHCP - all interfaces have static IP adresses.

In addition IPv6 is turned off for the host as well as the LXC container.
This is done by putting the the following 3 lines in sysctl.conf:
net.ipv6.conf.all.disable_ipv6 = 1 net.ipv6.conf.default.disable_ipv6 = 1 net.ipv6.conf.lo.disable_ipv6 = 1


Many thanks - Will

In the properties of the LXC, set IPv6 to static (with empty ip address) and not dhcp.
 
Last edited:
  • Like
Reactions: Airw0lf
Yes - the IPv6 field is set to static and all fields are left empty.

In addition - nothing on IPv6 in /etc/network/interfaces.
This applies for the host as well as the container.
 
Look at
Code:
systemd-analyze --help
or the man page. Maybe some of the options could help?

When I was having problems with this it turned out to the fault of the vm distro. Never did see what the fix was.
 
Last edited:
  • Like
Reactions: Airw0lf
I managed to solve (work-around?) this with:
(1) - disabling the ifupdown-wait-online.service
(2) - install ifupdown2 (which turned out removing the already installed ifupdown?)
Both where done within the LXC container

It now works as expected.
 
Last edited:
  • Like
Reactions: donhwyo
I went around in circles with other posts which were dead ends until I found this one.

What worked for Airw0lf worked for me, too, but just in case, I also disabled other services before. Here are all of the steps I performed including the installation of ifupdown2 which seemed to be the clincher:

Code:
systemctl disable --now systemd-networkd-wait-online.service
systemctl disable --now systemd-networkd.service
systemctl disable --now ifupdown-wait-online
apt-get update
apt-get upgrade
apt-get install ifupdown2
reboot
 
Bit of necroposting, but I think it's worth leaving an update here.
I had this problem today with proxmox 8.4 and lxc containers with debian 12 and I went a completely different route to fix it:

The container was configured with only 1 network interface, eth0, but in /etc/network/interfaces I found this:
Code:
auto lo
iface lo inet loopback

auto eth0
iface eth0 inet static
    address 10.0.0.26/24
    gateway 10.0.0.1

auto eth1
iface eth1 inet static
    address 10.0.0.26/24

which was causing ifupdown-wait-online.service to fail because eth1 doesn't actually exists.
When I removed it all worked as expected without installing/uninstalling any package or enabling/disabling any service.
 
For me, this started happening with Debian 13. I don't have any extra network adapters in /etc/network/interfaces. It works if I remove the following file, which is not present on previous versions of Debian:
Code:
/etc/systemd/system/network-online.target.wants/systemd-networkd-wait-online.service