ntp systemd-timesyncd issue

I’m not very familiar with raspberry pi and its commands. I’m facing a issue in my dietpi installed raspberry pi. Whenever I type ‘dietpi-software’ (to install/uninstall softwares), I get ‘waiting for completion of systemd-timesyncd’ multiple times then I get the error ‘Network time sync has not yet completed, or, failed to update’.
I have seen this earlier issue which I think I was solved by this commit, but still I’m not able to understand how to solve mine.
After boot it shows correct date time, I have checked that.

root@DietPi:~# dietpi-software
[  OK  ] DietPi-Software | Root access verified.
[  OK  ] DietPi-Software | RootFS R/W access verified.

[  OK  ] DietPi-Software | Initialized database
[  OK  ] DietPi-Software | Reading database
[  OK  ] DietPi-Software | Connection test: http://raspbian.raspberrypi.org/raspbian
[  OK  ] DietPi-Run_ntpd | systemctl restart systemd-timesyncd
[ INFO ] DietPi-Run_ntpd | NTPD: Waiting for completion of systemd-timesyncd (1/60)
[ INFO ] DietPi-Run_ntpd | NTPD: Waiting for completion of systemd-timesyncd (2/60)
...{lines removed to shorten the output for this post}
[ INFO ] DietPi-Run_ntpd | NTPD: Waiting for completion of systemd-timesyncd (44/60)

Change your NTP mirror to pool.ntp.org

It will automatically and randomly grab the lowest latency ntp server from a HUGE pool of global NTP servers…

in case you didn’t know
https://www.pool.ntp.org/en/

The pool.ntp.org project is a big virtual cluster of timeservers providing reliable easy to use NTP service for millions of clients.

The pool is being used by millions or tens of millions of systems around the world. It’s the default “time server” for most of the major Linux distributions and many networked appliances (see information for vendors).

Because of the large number of users we are in need of more servers. If you have a server with a static IP address always available on the internet, please consider adding it to the system.

The project is maintained and developed by Ask Bjørn Hansen and a great group of contributors on the mailing lists. The source code for the system is available.

Hosting and bandwidth for the “hub” servers are provided by Develooper and Phyber Communications.

https://www.ntppool.org/en/use.html

I have tried this, it again does this:

[  OK  ] DietPi-Run_ntpd | systemctl restart systemd-timesyncd
[ INFO ] DietPi-Run_ntpd | NTPD: Waiting for completion of systemd-timesyncd (1/60)
[ INFO ] DietPi-Run_ntpd | NTPD: Waiting for completion of systemd-timesyncd (2/60)

Edit: After selecting the new mirror, it tries to sync time (i think) and gives above mentioned errors again. Then goes back to couldn’t sync thing as shown in the image in original post.

Is your network and/or DNS server config setup correctly?

Can your system ping out to the internet?

I believe because I was using SSH in LAN to control the pi and my mobile had internet access. But still I’ll try to ping internet website from my pi today and will let you know here.

Please show status of the service: systemctl status systemd-timesyncd

Hello my internet is working fine in the pi. I tried this ‘systemctl status systemd-timesyncd’ and here’s the output I got:

root@DietPi:~# sudo systemctl status systemd-timesyncd
● systemd-timesyncd.service - Network Time Synchronization
Loaded: loaded (/lib/systemd/system/systemd-timesyncd.service; disabled; vendor preset: enabled)
Drop-In: /lib/systemd/system/systemd-timesyncd.service.d
└─disable-with-time-daemon.conf
Active: inactive (dead)
Docs: man:systemd-timesyncd.service(8)

I happened to see this, which says ntp service may be is conflicting with the timesyncd. So I commented few condition lines in timesyncd config and it worked. The website further says to purge the ntp. Should I do that?

Hmm no status logs at the end?

Try: systemctl start systemd-timesyncd
They wait for some seconds and repeat: systemctl status timesyncd

Ah did you install the ntp package?

In this case open dietpi-config > Advanced Options and choose “none/custom” as time sync mode.

This will lead to DietPi relying on correct time due to non systemd time sync daemons.

But if you don’t need very exact system time, usually I would recommend to stay with systemd and purge any 3rd party time sync systems: apt purge ntp

No I don’t remember installing ntp. I will just remove ntp. Thanks both of you for your time and help.

BOOM! Worked like a champ!

I purged ntp

Thanks!