systemd-timesyncd: No network connectivity, ...

Development on core packages and the distribution goes on in here.

systemd-timesyncd: No network connectivity, ...

Postby 2sdude » Mon Oct 04, 2021 12:49 am

My headless RPI3 does not know the time after booting.
I have systemd-timesyncd running. I ran:

$this->bbcode_second_pass_code('', '
# systemctl restart systemd-networkd
# systemctl status systemd-timesyncd
● systemd-timesyncd.service - Network Time Synchronization
Loaded: ...
...
Oct 03 18:47:07 bifrost systemd[1]: Starting Network Time Synchronization...
Oct 03 18:47:08 bifrost systemd[1]: Started Network Time Synchronization.
Oct 03 19:38:02 bifrost systemd-timesyncd[1159]: Network configuration changed, trying to establish connection.
Oct 03 19:38:02 bifrost systemd-timesyncd[1159]: No network connectivity, watching for changes.
')

I have wifi connectivity to it (headless, ssh).

$this->bbcode_second_pass_code('', '
# systemctl status systemd-networkd
● systemd-networkd.service - Network Configuration
Loaded: loaded (/usr/lib/systemd/system/systemd-networkd.service; enabled; vendor preset: enabled)
...
Oct 03 19:38:02 bifrost systemd[1]: Starting Network Configuration...
Oct 03 19:38:02 bifrost systemd-networkd[1214]: wlan0: Link UP
Oct 03 19:38:02 bifrost systemd-networkd[1214]: wlan0: Gained carrier
Oct 03 19:38:02 bifrost systemd-networkd[1214]: eth0: Link UP
Oct 03 19:38:02 bifrost systemd-networkd[1214]: lo: Link UP
Oct 03 19:38:02 bifrost systemd-networkd[1214]: lo: Gained carrier
Oct 03 19:38:02 bifrost systemd-networkd[1214]: wlan0: Gained IPv6LL
Oct 03 19:38:02 bifrost systemd-networkd[1214]: Enumeration completed
Oct 03 19:38:02 bifrost systemd[1]: Started Network Configuration.
Oct 03 19:38:02 bifrost systemd-networkd[1214]: wlan0: Connected WiFi access point: xxx (XX:17:XX:0e:XX:40)
')

What's going on?
2sdude
 
Posts: 22
Joined: Sun Nov 12, 2017 11:13 pm

Re: systemd-timesyncd: No network connectivity, ...

Postby 2sdude » Tue Oct 05, 2021 2:33 am

Problem was solved, but not sure I understand.
After removing the this file /etc/systemd/network/eth0.network timesyncd finally synced time over wlan
2sdude
 
Posts: 22
Joined: Sun Nov 12, 2017 11:13 pm

Re: systemd-timesyncd: No network connectivity, ...

Postby camerony » Wed Oct 06, 2021 4:56 pm

I believe this is an bug still. Downgrading systemd to systemd 248 (248.3-2-arch) fixes the issue without resorting to removing or renaming eth0.network

https://archlinuxarm.org/forum/viewtopic.php?f=15&t=15580
camerony
 
Posts: 3
Joined: Tue Oct 05, 2021 10:21 pm

Re: systemd-timesyncd: No network connectivity, ...

Postby bloke » Sat Nov 20, 2021 1:59 am

Agreed, seems to be a bug or issue with systemd-timesyncd and if the eth0 interface is not disabled. Sometimes I dont want to wire ethernet to a raspberry Pi and just ust wifi, actually this is quite often these days.

This issue annoyed me for a little while as i have a number of Arch Arm devices connected via wifi only and i know the easiest setup is systemd-timesyncd

This is how I set the eth0 on Arch Linux Arm distro's in current

5.10.79-2-raspberrypi4-ARCH #1 SMP PREEMPT Tue Nov 16 20:23:32 UTC 2021 aarch64 GNU/Linux

In /etc/systemd/network
eth.network
$this->bbcode_second_pass_code('', '[Match]
Name=eth*

[Network]
DHCP=yes
DNSSEC=no

[Link]
ActivationPolicy=always-down
')

5.10.77-1-raspberrypi-ARCH #1 SMP Fri Nov 5 17:26:12 UTC 2021 armv7l GNU/Linux

In /etc/systemd/network
eth0.network
$this->bbcode_second_pass_code('', '[Match]
Name=eth0

[Network]
DHCP=yes
DNSSEC=no

[Link]
ActivationPolicy=always-down
')

There is not need to delete files etc, put this in place and when / if things are fixed you can remove it.

to clarify the addition is just in the relevant .network file for the eth* interface
$this->bbcode_second_pass_code('', '[Link]
ActivationPolicy=always-down')

you should then see the similar output from timedatectl
$this->bbcode_second_pass_code('', '# timedatectl
Local time: Sat 2021-11-20 11:46:31 AEST
Universal time: Sat 2021-11-20 01:46:31 UTC
RTC time: n/a
Time zone: Australia/Brisbane (AEST, +1000)
System clock synchronized: yes
NTP service: active
RTC in local TZ: no
')
bloke
 
Posts: 19
Joined: Thu Jun 25, 2020 1:06 am

Re: systemd-timesyncd: No network connectivity, ...

Postby Styglian » Thu Nov 25, 2021 10:43 am

It looks like this might have been broken by this pull request: https://github.com/systemd/systemd/pull/19163
(more context here: https://github.com/systemd/systemd/issues/19143)

I was having the same problem, and found that adding the following section to /etc/systemd/network/eth0.network fixed it:
$this->bbcode_second_pass_code('', '
[Link]
RequiredForOnline=no
')
followed by:
$this->bbcode_second_pass_code('', '
$ sudo systemctl restart systemd-networkd
')
(I haven't tried actually connecting anything to the ethernet port afterwards, but I suspect that this would allow it to be used without breaking timesyncd if it's unplugged.)
Styglian
 
Posts: 2
Joined: Thu Nov 25, 2021 10:25 am

Re: systemd-timesyncd: No network connectivity, ...

Postby gdr01 » Mon Jan 24, 2022 9:05 pm

Just had the same problem on Pi 4 running aarch64, after installing using the wired connection then moving to the onboard wifi.
Adding the Link section to
/etc/systemd/network/eth.network
and restarting as stated worked.
thanks mate
gdr01
 
Posts: 8
Joined: Fri Apr 29, 2016 1:22 pm


Return to Arch Linux ARM

Who is online

Users browsing this forum: No registered users and 2 guests