Re: [gentoo-user] network do not come up after booting, only manual reloading (systemd-networkd)

2021-09-05 Thread Canek Peláez Valdés
On Sun, Sep 5, 2021 at 1:36 PM Tamer Higazi  wrote:
[...]

> × systemd-networkd-wait-online.service - Wait for Network to be Configured
>   Loaded: loaded
> (/lib/systemd/system/systemd-networkd-wait-online.service; enabled;
> vendor preset: disabled)
>   Active: failed (Result: exit-code) since Sun 2021-09-05 20:22:19
> CEST; 11min ago
> Docs: man:systemd-networkd-wait-online.service(8)
> Main PID: 984 (code=exited, status=1/FAILURE)


> Sep 05 20:20:18 tux systemd[1]: Starting Wait for Network to be
> Configured...
> Sep 05 20:22:19 tux systemd-networkd-wait-online[984]: Timeout occurred
> while waiting for network connectivity.
> Sep 05 20:22:19 tux systemd[1]: systemd-networkd-wait-online.service:
> Main process exited, code=exited, status=1/FAILURE
> Sep 05 20:22:19 tux systemd[1]: systemd-networkd-wait-online.service:
> Failed with result 'exit-code'.
> Sep 05 20:22:19 tux systemd[1]: Failed to start Wait for Network to be
> Configured.
>

There's your problem: systemd-networkd-wait-online.service is timing out:

Sep 05 20:22:19 tux systemd-networkd-wait-online[984]: Timeout
occurred while waiting for network connectivity.

The systemd-networkd-wait-online service runs relatively early and waits
for *ALL* interfaces it is aware of to be fully configured or failed[1], so
it probably one of your interfaces is taking too long to be ready. Between
timing out and you restarting systemd-networkd.service, the interface
reaches the ready state (or fails), and
systemd-networkd-wait-online.service doesn't time out anymore.

By your logs, you have two ethernet interfaces: enp6s0 and enp7s0, the
latter not in use. Do you .network files in /etc/systemd/network/ or
/run/systemd/network/? Any changes (uncommented lines) in
/etc/systemd/networkd.conf?

Regards.

[1]
https://man7.org/linux/man-pages/man8/systemd-networkd-wait-online.8.html
-- 
Dr. Canek Peláez Valdés
Profesor de Carrera Asociado C
Departamento de Matemáticas
Facultad de Ciencias
Universidad Nacional Autónoma de México


Re: [gentoo-user] network do not come up after booting, only manual reloading (systemd-networkd)

2021-09-05 Thread Tamer Higazi

Dear Dr. Valdés,

As requested the desired output.

tux / # systemctl status systemd-networkd.socket 
systemd-networkd-wait-online.service

● systemd-networkd.socket - Network Service Netlink Socket
 Loaded: loaded (/lib/systemd/system/systemd-networkd.socket; 
enabled; vendor preset: disabled)

 Active: active (running) since Sun 2021-09-05 20:20:18 CEST; 13min ago
   Triggers: ● systemd-networkd.service
   Docs: man:systemd-networkd.service(8)
 man:rtnetlink(7)
 Listen: route 1361 (Netlink)
 CGroup: /system.slice/systemd-networkd.socket

Notice: journal has been rotated since unit was started, output may be 
incomplete.


× systemd-networkd-wait-online.service - Wait for Network to be Configured
 Loaded: loaded 
(/lib/systemd/system/systemd-networkd-wait-online.service; enabled; 
vendor preset: disabled)
 Active: failed (Result: exit-code) since Sun 2021-09-05 20:22:19 
CEST; 11min ago

   Docs: man:systemd-networkd-wait-online.service(8)
   Main PID: 984 (code=exited, status=1/FAILURE)

Sep 05 20:20:18 tux systemd[1]: Starting Wait for Network to be 
Configured...
Sep 05 20:22:19 tux systemd-networkd-wait-online[984]: Timeout occurred 
while waiting for network connectivity.
Sep 05 20:22:19 tux systemd[1]: systemd-networkd-wait-online.service: 
Main process exited, code=exited, status=1/FAILURE
Sep 05 20:22:19 tux systemd[1]: systemd-networkd-wait-online.service: 
Failed with result 'exit-code'.
Sep 05 20:22:19 tux systemd[1]: Failed to start Wait for Network to be 
Configured.


Am 9/5/21 um 7:07 PM schrieb Canek Peláez Valdés:
On Sun, Sep 5, 2021 at 2:46 AM Tamer Higazi > wrote:


Hi people,

After upgrading my gentoo box i see a new behavior, that my machine
after boot doen't configure my network. My network is configured
through
systemd-network,

Only if I manually after login execute: "systemctl restart
systemd-network" it gets configured.
Can somebody tell me why this is the case and how to fix it ?


Could you please tell us the output of:

systemctl status systemd-networkd.socket 
systemd-networkd-wait-online.service


*before* you restart systemd-networkd.service?

Regards.
--
Dr. Canek Peláez Valdés
Profesor de Carrera Asociado C
Departamento de Matemáticas
Facultad de Ciencias
Universidad Nacional Autónoma de México




Re: [gentoo-user] network do not come up after booting, only manual reloading (systemd-networkd)

2021-09-05 Thread Canek Peláez Valdés
On Sun, Sep 5, 2021 at 2:46 AM Tamer Higazi  wrote:

> Hi people,
>
> After upgrading my gentoo box i see a new behavior, that my machine
> after boot doen't configure my network. My network is configured through
> systemd-network,
>
> Only if I manually after login execute: "systemctl restart
> systemd-network" it gets configured.
> Can somebody tell me why this is the case and how to fix it ?
>

Could you please tell us the output of:

systemctl status systemd-networkd.socket
systemd-networkd-wait-online.service

*before* you restart systemd-networkd.service?

Regards.
-- 
Dr. Canek Peláez Valdés
Profesor de Carrera Asociado C
Departamento de Matemáticas
Facultad de Ciencias
Universidad Nacional Autónoma de México


Re: [gentoo-user] network do not come up after booting, only manual reloading (systemd-networkd)

2021-09-05 Thread cal
On 9/5/21 12:46 AM, Tamer Higazi wrote:
> Hi people,
> 
> After upgrading my gentoo box i see a new behavior, that my machine
> after boot doen't configure my network. My network is configured through
> systemd-network,
> 
> Only if I manually after login execute: "systemctl restart
> systemd-network" it gets configured.
> Can somebody tell me why this is the case and how to fix it ?
> 
> systemctl Logs:
> 
> after start:
> 
> ● systemd-networkd.service - Network Configuration
>  Loaded: loaded (/lib/systemd/system/systemd-networkd.service;
> enabled; vendor preset: enabled)
>  Active: active (running) since Sat 2021-09-04 08:49:48 CEST; 1min
> 4s ago
> TriggeredBy: ● systemd-networkd.socket
>    Docs: man:systemd-networkd.service(8)
>    Main PID: 957 (systemd-network)
>  Status: "Processing requests..."
>   Tasks: 1 (limit: 19136)
>  Memory: 2.3M
>  CGroup: /system.slice/systemd-networkd.service
>  └─957 /lib/systemd/systemd-networkd
> 
> Sep 04 08:49:48 tux systemd[1]: Starting Network Configuration...
> Sep 04 08:49:48 tux systemd-networkd[957]: lo: Link UP
> Sep 04 08:49:48 tux systemd-networkd[957]: lo: Gained carrier
> Sep 04 08:49:48 tux systemd-networkd[957]: Enumeration completed
> Sep 04 08:49:48 tux systemd[1]: Started Network Configuration.
> Sep 04 08:49:49 tux systemd-networkd[957]: eth0: Interface name change
> detected, renamed to enp6s0.
> Sep 04 08:49:49 tux systemd-networkd[957]: eth1: Interface name change
> detected, renamed to enp7s0.
> 
> after manually restart (systemctl restart systemd-networkd):
> 
> 
> ● systemd-networkd.service - Network Configuration
>  Loaded: loaded (/lib/systemd/system/systemd-networkd.service;
> enabled; vendor preset: enabled)
>  Active: active (running) since Sat 2021-09-04 08:51:47 CEST; 13s ago
> TriggeredBy: ● systemd-networkd.socket
>    Docs: man:systemd-networkd.service(8)
>    Main PID: 1167 (systemd-network)
>  Status: "Processing requests..."
>   Tasks: 1 (limit: 19136)
>  Memory: 1.0M
>  CGroup: /system.slice/systemd-networkd.service
>  └─1167 /lib/systemd/systemd-networkd
> 
> Sep 04 08:51:47 tux systemd[1]: Starting Network Configuration...
> Sep 04 08:51:47 tux systemd-networkd[1167]: enp6s0: Link UP
> Sep 04 08:51:47 tux systemd-networkd[1167]: enp6s0: Gained carrier
> Sep 04 08:51:47 tux systemd-networkd[1167]: lo: Link UP
> Sep 04 08:51:47 tux systemd-networkd[1167]: lo: Gained carrier
> Sep 04 08:51:47 tux systemd-networkd[1167]: Enumeration completed
> Sep 04 08:51:47 tux systemd[1]: Started Network Configuration.
> Sep 04 08:51:48 tux systemd-networkd[1167]: enp6s0: Gained IPv6LL

What does your networkd configuration look like?  One thing that stands
out from your example logs is that the first networkd startup seems to
occur _before_ udev assigns predictable network interface names (eth0 ->
enp6s0), I'm wondering if that's why it works after you later restart
the daemon.

I'm not a systemd expert -- perhaps there is a dependency ordering issue
here?  https://github.com/systemd/systemd/issues/7293



[gentoo-user] network do not come up after booting, only manual reloading (systemd-networkd)

2021-09-05 Thread Tamer Higazi

Hi people,

After upgrading my gentoo box i see a new behavior, that my machine 
after boot doen't configure my network. My network is configured through 
systemd-network,


Only if I manually after login execute: "systemctl restart 
systemd-network" it gets configured.

Can somebody tell me why this is the case and how to fix it ?

systemctl Logs:

after start:

● systemd-networkd.service - Network Configuration
 Loaded: loaded (/lib/systemd/system/systemd-networkd.service; 
enabled; vendor preset: enabled)
 Active: active (running) since Sat 2021-09-04 08:49:48 CEST; 1min 
4s ago

TriggeredBy: ● systemd-networkd.socket
   Docs: man:systemd-networkd.service(8)
   Main PID: 957 (systemd-network)
 Status: "Processing requests..."
  Tasks: 1 (limit: 19136)
 Memory: 2.3M
 CGroup: /system.slice/systemd-networkd.service
 └─957 /lib/systemd/systemd-networkd

Sep 04 08:49:48 tux systemd[1]: Starting Network Configuration...
Sep 04 08:49:48 tux systemd-networkd[957]: lo: Link UP
Sep 04 08:49:48 tux systemd-networkd[957]: lo: Gained carrier
Sep 04 08:49:48 tux systemd-networkd[957]: Enumeration completed
Sep 04 08:49:48 tux systemd[1]: Started Network Configuration.
Sep 04 08:49:49 tux systemd-networkd[957]: eth0: Interface name change 
detected, renamed to enp6s0.
Sep 04 08:49:49 tux systemd-networkd[957]: eth1: Interface name change 
detected, renamed to enp7s0.


after manually restart (systemctl restart systemd-networkd):


● systemd-networkd.service - Network Configuration
 Loaded: loaded (/lib/systemd/system/systemd-networkd.service; 
enabled; vendor preset: enabled)

 Active: active (running) since Sat 2021-09-04 08:51:47 CEST; 13s ago
TriggeredBy: ● systemd-networkd.socket
   Docs: man:systemd-networkd.service(8)
   Main PID: 1167 (systemd-network)
 Status: "Processing requests..."
  Tasks: 1 (limit: 19136)
 Memory: 1.0M
 CGroup: /system.slice/systemd-networkd.service
 └─1167 /lib/systemd/systemd-networkd

Sep 04 08:51:47 tux systemd[1]: Starting Network Configuration...
Sep 04 08:51:47 tux systemd-networkd[1167]: enp6s0: Link UP
Sep 04 08:51:47 tux systemd-networkd[1167]: enp6s0: Gained carrier
Sep 04 08:51:47 tux systemd-networkd[1167]: lo: Link UP
Sep 04 08:51:47 tux systemd-networkd[1167]: lo: Gained carrier
Sep 04 08:51:47 tux systemd-networkd[1167]: Enumeration completed
Sep 04 08:51:47 tux systemd[1]: Started Network Configuration.
Sep 04 08:51:48 tux systemd-networkd[1167]: enp6s0: Gained IPv6LL