Systemd-timesyncd "time out waiting for reply" Topic is solved

Having issues with your DietPi installation, or, found a bug? Post it here.
SimonFili
Posts: 18
Joined: Sun Nov 22, 2020 4:43 pm

Systemd-timesyncd "time out waiting for reply"

Post by SimonFili »

Hi there,

I'm using DietPi (5.4.72+ #1356) on a Raspberry PI Zero W.

I 'm getting this error when booting or restarting the time sync daemon:

DietPi Systemd-timesynched[1747]: Timed out waiting for reply from 108.161.151.187:123 (1.north-america.pool.ntp.org)

Multiple lines like this with different IP/DNS

From my windows machine, I can see those NTP server respond OK:

w32tm /stripchart /computer:1.north-america.pool.ntp.org /dataonly /samples:5
Suivi de 1.north-america.pool.ntp.org [199.101.100.221:123].
Collecte de 5 échantillons.
L’heure actuelle est 2020-11-22 11:22:28.
11:22:28, +00.0307804s
11:22:30, +00.0312482s
11:22:32, +00.0310455s
11:22:34, +00.0311427s
11:22:36, +00.0312408s
From the DietPi console, I can adequately ping those NTP servers, so not a connecting issue.

My time is a few seconds off from my windows 10 machine.

I also have the issue, maybe related to the time sync of never getting a prompt when connecting SSH from my Windows to DietPi
login as: root
root@192.168.10.3's password:
Linux DietPi 5.4.72+ #1356 Thu Oct 22 13:56:00 BST 2020 armv6l

The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.
Any pointer would be appreciated.

Thanks! Simon
Last edited by SimonFili on Thu Nov 26, 2020 1:23 pm, edited 1 time in total.
User avatar
Joulinar
Posts: 2597
Joined: Sat Nov 16, 2019 12:49 am

Re: Systemd-timesyncd "time out waiting for reply" + SSH

Post by Joulinar »

Hi

did you tried to change NTP server to the Global one pool.ntp.org? do you know if your internet router is providing NTP functionality as well? If yes, you could set NTP server to your Gateway.
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
SimonFili
Posts: 18
Joined: Sun Nov 22, 2020 4:43 pm

Re: Systemd-timesyncd "time out waiting for reply" + SSH

Post by SimonFili »

Hi,

It was pointing to Global before with the same issue.

Then I re-installed everything with a recent image, disabling everything I did not need. This PiZ is only used for Node-Red + MQTT

I just tried to change the mode from 2 (boot+daily) to 3 (boot+daily), did to change anything.

Then tried mode 4, daemon + drift... Seems the time is closer to my PC now.
Yes my local router answers to NTP w32tm

Did a reboot, I still see timeouts but also errors "the unit file, source configuration file or drop-ins of systemd-timesyncd changed on disk, run 'systemctrl daemon-reload"....

So logged in and did "systemctl daemon-reload"... no feedback
Did another reboot...
Same error: "the unit file, source configuration file or drop-ins of systemd-timesyncd changed on disk, run 'sustemctrl daemon-reload"....

The boot process recommended: Systemctl -l status systemd-timesyncd for more info
Showing active but timeout on all NTP destinations

So I manually changed the /etc/systemd/timesyncd.conf to point only to my router IPv4
Reloaded with systemctl daemon-reload
The restarted the daemon : systemctl restart systemd-timesyncd
Then status... same issue, timeout reading my local router... even tough from my win10 PC, w32tm worked fine.

Seems the timesyncd process is broken?

I did a new install yesterday with fresh image from the web.

Any thoughts?
SimonFili
Posts: 18
Joined: Sun Nov 22, 2020 4:43 pm

Re: Systemd-timesyncd "time out waiting for reply" + SSH

Post by SimonFili »

I went back to dietpi-config and changed the mode to 0 (custom).

Did a reload systemctl daemon-reload
and a restart : systemctl restart systemd-timesyncd
Then a status, I did get a synced after 2 timeouts !

Did a reboot, and status... timesync is loaded, but inactive.

Then did a start of the service and status...
Go a sync after 4 timeouts!

then enabled the service and reboot... seems to skip the sync at boot time.
Then did a status, only getting timeouts!
User avatar
Joulinar
Posts: 2597
Joined: Sat Nov 16, 2019 12:49 am

Re: Systemd-timesyncd "time out waiting for reply" + SSH

Post by Joulinar »

usually time sync is working well. There seems to be something special on your system.

To set NTP to point to your router, do following

dietpi-config > 8 : Network Options: Misc > NTP Mirror > Gateway

This will perform a check already to see if time sync is working

A manual time sync can be started as follow: /boot/dietpi/func/run_ntpd
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
SimonFili
Posts: 18
Joined: Sun Nov 22, 2020 4:43 pm

Re: Systemd-timesyncd "time out waiting for reply" + SSH

Post by SimonFili »

ok Thanks, did those 2:

dietpi-config > 8 : Network Options: Misc > NTP Mirror > Gateway
/boot/dietpi/func/run_ntpd
no error

Then went back in dietpi-config and put time sync mode to boot+daily
Then re-ran /boot/dietpi/func/run_ntpd

I got the timeouts again. Weird

Here are 2 photos to capture the output, since I don't have ssh working!
t2.jpg
Time1.jpg
User avatar
Joulinar
Posts: 2597
Joined: Sat Nov 16, 2019 12:49 am

Re: Systemd-timesyncd "time out waiting for reply" + SSH

Post by Joulinar »

but you have a valid network connection from your DietPi device? Are you sure your WiFi is stable?
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
SimonFili
Posts: 18
Joined: Sun Nov 22, 2020 4:43 pm

Re: Systemd-timesyncd "time out waiting for reply" + SSH

Post by SimonFili »

Thanks for the help!

I'm running from my Win10 PC a ping -t, with 0 drops and an average of 7ms to the Pi IP

From the Pi IP, a ping to google.ca give me an 8ms avg over 100 packets

My wifi is super solid on a gig connection to a fibre router running at 150Mbps

We have 4 working from home with no issues.

From what I understand, it's not related to bad wifi.

I checked the power of the Pi, running fine at 5.1v Temp is also 31°C

Maybe I have bad hardware but I only have one Pi Zero and 1 SD card, so hard to test.

I have many ESP8266 on the same network talking to an MQTT server with no issues
User avatar
Joulinar
Posts: 2597
Joined: Sat Nov 16, 2019 12:49 am

Re: Systemd-timesyncd "time out waiting for reply" + SSH

Post by Joulinar »

strange that /boot/dietpi/func/run_ntpd is working one time but not a 2nd time, even if you target your internet router as NTP server. Usually staying inside local network should be quite fast.

can you scan journalctl to see if there is anything special
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
User avatar
trendy
Posts: 156
Joined: Tue Feb 25, 2020 2:54 pm

Re: Systemd-timesyncd "time out waiting for reply" + SSH

Post by trendy »

I would also investigate with tcpdump on dietpi and wireshark on windows whether the ntp packets are indeed sent received properly.
Post Reply