systemd-timesyncd hanging for 40 seconds during boot

Having issues with your DietPi installation, or, found a bug? Post it here.
Post Reply
User avatar
Joulinar
Posts: 2549
Joined: Sat Nov 16, 2019 12:49 am

systemd-timesyncd hanging for 40 seconds during boot

Post by Joulinar »

Hi guys,

i discovered that timesyncd takes close to 40 seconds to complete during boot. I already switched to local ntp server within my network but still it takes 40 seconds

Code: Select all

root@DietPiVM1:~# journalctl -u systemd-timesyncd
-- Logs begin at Tue 2020-01-07 23:07:35 CET, end at Tue 2020-01-07 23:09:04 CET. --
Jan 07 23:07:39 DietPiVM1 systemd[1]: Starting Network Time Synchronization...
Jan 07 23:07:40 DietPiVM1 systemd[1]: Started Network Time Synchronization.
Jan 07 23:08:19 DietPiVM1 systemd-timesyncd[550]: Synchronized to time server for the first time 192.168.0.1:123 (192.168.0.1).
Jan 07 23:08:20 DietPiVM1 systemd[1]: Stopping Network Time Synchronization...
Jan 07 23:08:20 DietPiVM1 systemd[1]: systemd-timesyncd.service: Succeeded.
Jan 07 23:08:20 DietPiVM1 systemd[1]: Stopped Network Time Synchronization.
this happen during boot only. If I restart the service later on, it will finish quite fast

Code: Select all

Jan 07 23:09:03 DietPiVM1 systemd[1]: Starting Network Time Synchronization...
Jan 07 23:09:04 DietPiVM1 systemd[1]: Started Network Time Synchronization.
Jan 07 23:09:04 DietPiVM1 systemd-timesyncd[988]: Synchronized to time server for the first time 192.168.0.1:123 (192.168.0.1).
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
Skirge01
Posts: 10
Joined: Wed Jan 08, 2020 7:45 pm

Re: systemd-timesyncd hanging for 40 seconds during boot

Post by Skirge01 »

Mine started doing that a day or so ago, but stopped after I rebooted a few times today. Doesn't mean it won't return, but I also switched to a local NTP server a few minutes ago.
User avatar
Joulinar
Posts: 2549
Joined: Sat Nov 16, 2019 12:49 am

Re: systemd-timesyncd hanging for 40 seconds during boot

Post by Joulinar »

Hi,
for me a local NTP did not solved it. It's hanging for 30 seconds during boot now.
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
Skirge01
Posts: 10
Joined: Wed Jan 08, 2020 7:45 pm

Re: systemd-timesyncd hanging for 40 seconds during boot

Post by Skirge01 »

Sorry I wasn't clearer. The hanging stopped before I changed to a local NTP server. I just used your mentioning of your own NTP server to kick my butt into gear and point dietpi to mine. :) Strangely enough, just a few reboots and it stopped hanging. I have no idea why.
User avatar
Joulinar
Posts: 2549
Joined: Sat Nov 16, 2019 12:49 am

Re: systemd-timesyncd hanging for 40 seconds during boot

Post by Joulinar »

strange, indeed. I did quite a lot of reboots the last days for testing purposes and it seems boot times are back to normal. But honestly, I don't know why. Even more strange, its gone on all my devices like VM, RPi3 and RPi4 at the same time.
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
Post Reply