Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.debian.user > #238981 > unrolled thread

bullseye: systemd-networkd-wait-online timeouts

Started byJochen Spieker <ml@well-adjusted.de>
First post2021-08-18 22:00 +0200
Last post2021-08-25 08:30 +0200
Articles 6 — 3 participants

Back to article view | Back to linux.debian.user


Contents

  bullseye: systemd-networkd-wait-online timeouts Jochen Spieker <ml@well-adjusted.de> - 2021-08-18 22:00 +0200
    Re: bullseye: systemd-networkd-wait-online timeouts Charles Curley <charlescurley@charlescurley.com> - 2021-08-18 23:40 +0200
      Re: bullseye: systemd-networkd-wait-online timeouts Jochen Spieker <ml@well-adjusted.de> - 2021-08-19 12:00 +0200
    Re: bullseye: systemd-networkd-wait-online timeouts Andy Smith <andy@strugglers.net> - 2021-08-19 22:10 +0200
      Re: bullseye: systemd-networkd-wait-online timeouts Jochen Spieker <ml@well-adjusted.de> - 2021-08-21 00:00 +0200
    Re: bullseye: systemd-networkd-wait-online timeouts Jochen Spieker <ml@well-adjusted.de> - 2021-08-25 08:30 +0200

#238981 — bullseye: systemd-networkd-wait-online timeouts

FromJochen Spieker <ml@well-adjusted.de>
Date2021-08-18 22:00 +0200
Subjectbullseye: systemd-networkd-wait-online timeouts
Message-ID<CNzTb-7vx-11@gated-at.bofh.it>

[Multipart message — attachments visible in raw view] — view raw

Hi,

I upgraded my virtual server to bullseye already and I found one issue
in the logs:

Aug 18 10:59:20 h2907737 systemd-networkd-wait-online[936688]: Event loop failed: Connection timed out
Aug 18 10:59:20 h2907737 apt-helper[936686]: E: Sub-process /lib/systemd/systemd-networkd-wait-online returned an error code (1)

For some reason systemd does not (fully?) recognize that the system is
online. The network is still configured using ifupdown with this
interfaces(5) file. I know it looks weird, but I have no control over it
on this system. The file is provided by my hosting provider:


| # This configuration file is auto-generated.
| # WARNING: Do not edit this file, otherwise your changes will be lost.
| # Please edit template /etc/network/interfaces.template instead.
| 
| auto lo
| iface lo inet loopback
| 
| # Auto generated venet0 interfaces
| auto venet0
| iface venet0 inet static
|         address 127.0.0.1
|         netmask 255.255.255.255
|         broadcast 0.0.0.0
|         up route add default dev venet0
| auto venet0:0
| iface venet0:0 inet static
|         address 85.x.y.z
|         netmask 255.255.255.255
| 
| 
| iface venet0 inet6 static
|         address 2a01:dead:beef:dead:beef:dead:beef:dead/128
|         up ip -6 r a default dev venet0


Systemd thinks the devices (even lo) are in state "pending":

# networkctl status -a
● 1: lo
                     Link File: n/a
                  Network File: n/a
                          Type: loopback
                         State: carrier (pending)
                    HW Address: 00:00:00:00:00:00
                           MTU: 65536
                         QDisc: noqueue
  IPv6 Address Generation Mode: eui64
          Queue Length (Tx/Rx): 1/1
                       Address: 127.0.0.1
                                ::1

● 2: venet0
                     Link File: n/a
                  Network File: n/a
                          Type: void
                         State: routable (pending)
                           MTU: 1500
                         QDisc: noqueue
  IPv6 Address Generation Mode: eui64
          Queue Length (Tx/Rx): 1/1
              Auto negotiation: no
                         Speed: 10Gbps
                        Duplex: full
                          Port: tp
                       Address: 85.x.y.z
                                127.0.0.1
                                2a01:dead:beef:dead:beef:dead:beef:dead


Is there anything I can do about this without changing
/etc/network/interfaces? As far as I understand, I cannot switch to
systemd network configuration as long as the interfaces file exists.

Regards,
Jochen
-- 
If nightclub doormen recognised me I would be more fulfilled.
[Agree]   [Disagree]
                 <http://archive.slowlydownward.com/NODATA/data_enter2.html>

[toc] | [next] | [standalone]


#238983

FromCharles Curley <charlescurley@charlescurley.com>
Date2021-08-18 23:40 +0200
Message-ID<CNBrY-az-5@gated-at.bofh.it>
In reply to#238981

[Multipart message — attachments visible in raw view] — view raw

On Wed, 18 Aug 2021 21:36:30 +0200
Jochen Spieker <ml@well-adjusted.de> wrote:

> Is there anything I can do about this without changing
> /etc/network/interfaces? As far as I understand, I cannot switch to
> systemd network configuration as long as the interfaces file exists.

Can you get anywhere by editing the template?

Also, this interfaces file assigns address 127.0.0.1 to the interface
venet0. Since that block (127.0.0.0/8, I believe) is reserved for the
loopback device (interface lo), and is assigned automatically to lo,
this setup is assigning 127.0.0.1 to both lo and venet:0. And that
strikes me as a recipe for problems.

-- 
Does anybody read signatures any more?

https://charlescurley.com
https://charlescurley.com/blog/

[toc] | [prev] | [next] | [standalone]


#239026

FromJochen Spieker <ml@well-adjusted.de>
Date2021-08-19 12:00 +0200
Message-ID<CNN06-7NL-9@gated-at.bofh.it>
In reply to#238983

[Multipart message — attachments visible in raw view] — view raw

Charles Curley:
> On Wed, 18 Aug 2021 21:36:30 +0200
> Jochen Spieker <ml@well-adjusted.de> wrote:
> 
>> Is there anything I can do about this without changing
>> /etc/network/interfaces? As far as I understand, I cannot switch to
>> systemd network configuration as long as the interfaces file exists.
> 
> Can you get anywhere by editing the template?

I do not have access to the template. It does not exist on my VM and I
assume it only exists in the hosting provider's infrastructure.

> Also, this interfaces file assigns address 127.0.0.1 to the interface
> venet0. Since that block (127.0.0.0/8, I believe) is reserved for the
> loopback device (interface lo), and is assigned automatically to lo,
> this setup is assigning 127.0.0.1 to both lo and venet:0. And that
> strikes me as a recipe for problems.

I totally agree and I have no idea why they are doing it this way. I
still would like to know why systemd does not recognize that the
interface configuration using ifupdown was successful and the the system
actually is online.

J.
-- 
Tony Blair is a hypnotised self-seeking scarecrow just like all the
rest.
[Agree]   [Disagree]
                 <http://archive.slowlydownward.com/NODATA/data_enter2.html>

[toc] | [prev] | [next] | [standalone]


#239063

FromAndy Smith <andy@strugglers.net>
Date2021-08-19 22:10 +0200
Message-ID<CNWwp-5KD-3@gated-at.bofh.it>
In reply to#238981
Hi Jochen,

On Wed, Aug 18, 2021 at 09:36:30PM +0200, Jochen Spieker wrote:
> Aug 18 10:59:20 h2907737 systemd-networkd-wait-online[936688]: Event loop failed: Connection timed out
> Aug 18 10:59:20 h2907737 apt-helper[936686]: E: Sub-process /lib/systemd/systemd-networkd-wait-online returned an error code (1)
> 
> For some reason systemd does not (fully?) recognize that the system is
> online.

I don't know yet about bullseye but in buster systemd does assume
that you are online when using ifupdown unless you enable the
"ifupdown-wait-online" service, which actually waits for every
interface marked auto be be ready before allowing "network-online"
target to be reached.

Is that service enabled? If you disable it, what happens? I expect
systemd to assume it is online.

Also are you absolutely sure that you aren't using systemd-networkd
and/or NetworkManager and there isn't any .link files for systemd
anywhere, that it's purely ifupdown?

May be worth asking your hosting provider as well because uf they
are mandating how your /etc/network/interfaces looks (and its use)
then they need to know how to make it play nice with systemd in
Debian 11.

Cheers,
Andy

-- 
https://bitfolk.com/ -- No-nonsense VPS hosting

[toc] | [prev] | [next] | [standalone]


#239103

FromJochen Spieker <ml@well-adjusted.de>
Date2021-08-21 00:00 +0200
Message-ID<COkIr-3Ui-5@gated-at.bofh.it>
In reply to#239063

[Multipart message — attachments visible in raw view] — view raw

Andy Smith:
> On Wed, Aug 18, 2021 at 09:36:30PM +0200, Jochen Spieker wrote:
>
>> Aug 18 10:59:20 h2907737 systemd-networkd-wait-online[936688]: Event loop failed: Connection timed out
>> Aug 18 10:59:20 h2907737 apt-helper[936686]: E: Sub-process /lib/systemd/systemd-networkd-wait-online returned an error code (1)
>> 
>> For some reason systemd does not (fully?) recognize that the system is
>> online.
> 
> I don't know yet about bullseye but in buster systemd does assume
> that you are online when using ifupdown unless you enable the
> "ifupdown-wait-online" service, which actually waits for every
> interface marked auto be be ready before allowing "network-online"
> target to be reached.
> 
> Is that service enabled? If you disable it, what happens? I expect
> systemd to assume it is online.

Sounds like a good idea! But:

# systemctl status ifupdown-wait-online.service
● ifupdown-wait-online.service - Wait for network to be configured by ifupdown
     Loaded: loaded (/lib/systemd/system/ifupdown-wait-online.service; enabled; vendor preset: enabled)
     Active: active (exited) since Sun 2021-08-15 00:16:58 CEST; 5 days ago
   Main PID: 79 (code=exited, status=0/SUCCESS)
      Tasks: 0 (limit: 105)
     Memory: 0B
     CGroup: /system.slice/ifupdown-wait-online.service

Aug 15 00:16:58 xxxxxxxx.stratoserver.net systemd[1]: Finished Wait for network to be configured by ifupdown.
Warning: journal has been rotated since unit was started, output may be incomplete.

# systemctl disable --now ifupdown-wait-online.service 
Removed /etc/systemd/system/network-online.target.wants/ifupdown-wait-online.service.

# /lib/systemd/systemd-networkd-wait-online  --timeout=2 --any
Event loop failed: Connection timed out


> Also are you absolutely sure that you aren't using systemd-networkd
> and/or NetworkManager and there isn't any .link files for systemd
> anywhere, that it's purely ifupdown?

The package network-manager is not installed, /etc/systemd/network is
empty and /etc/systemd/networkd.conf only contains comments, so I think
I am sure.

> May be worth asking your hosting provider as well because uf they
> are mandating how your /etc/network/interfaces looks (and its use)
> then they need to know how to make it play nice with systemd in
> Debian 11.

That is probable the right approach. Thanks for your suggestions!

J.
-- 
No-one appears to be able to help me.
[Agree]   [Disagree]
                 <http://archive.slowlydownward.com/NODATA/data_enter2.html>

[toc] | [prev] | [next] | [standalone]


#239296

FromJochen Spieker <ml@well-adjusted.de>
Date2021-08-25 08:30 +0200
Message-ID<CPUAa-6Em-1@gated-at.bofh.it>
In reply to#238981

[Multipart message — attachments visible in raw view] — view raw

Jochen Spieker:
> 
> Aug 18 10:59:20 h2907737 systemd-networkd-wait-online[936688]: Event loop failed: Connection timed out
> Aug 18 10:59:20 h2907737 apt-helper[936686]: E: Sub-process /lib/systemd/systemd-networkd-wait-online returned an error code (1)

I was able to at least work around this problem by editing the file
/etc/apt/apt.conf.d/50unattended-upgrades:

| // Download and install upgrades only on non-metered connection
| // (i.e. skip or gracefully stop updates on a metered connection)
| Unattended-Upgrade::Skip-Updates-On-Metered-Connections "false";

This way I still get the errors in the logs, but apt continues fetching
updates as intended. Since this is a VPS there is no risk that the
system will suddenly start using a metered connection.

J.
-- 
If I was Mark Chapman I would have shot John Lennon with a water pistol.
[Agree]   [Disagree]
                 <http://archive.slowlydownward.com/NODATA/data_enter2.html>

[toc] | [prev] | [standalone]


Back to top | Article view | linux.debian.user


csiph-web