3

This is on HypriotOS (Debian GNU/Linux 10) running on RaPi.

$ timedatectl show-timesync
Failed to parse bus message: Connection timed out

Then do this with sudo:

$ sudo timedatectl timesync-status
Failed to query server: Failed to activate service 'org.freedesktop.timesync1': timed out (service_start_timeout=25000ms)

Then showing the timedatectl status reveals that "NTP service: inactive"

$ timedatectl status
               Local time: Sat 2020-03-07 21:03:51 CET
           Universal time: Sat 2020-03-07 20:03:51 UTC
                 RTC time: n/a
                Time zone: Europe/Zurich (CET, +0100)
System clock synchronized: yes
              NTP service: inactive
          RTC in local TZ: no

What is the proper way to fix this? Or first maybe, from where to pull information for analysis?

I already set the correct NTP servers in /etc/systemd/timesyncd.conf and then ran $ sudo timedatectl set-ntp false followed by $ sudo timedatectl set-ntp true.

Update 2020-03-23

Restarting timesyncd as proposed doesn't work - it ain't there.

$ systemctl restart timesyncd
Failed to restart timesyncd.service: The name org.freedesktop.PolicyKit1 was not provided by any .service files
See system logs and 'systemctl status timesyncd.service' for details.
$ sudo systemctl restart timesyncd
Failed to restart timesyncd.service: Unit timesyncd.service not found.
$ systemctl status timesyncd.service
Unit timesyncd.service could not be found.
Marcel Stör
  • 191
  • 1
  • 2
  • 8

2 Answers2

2

As of Ubuntu Server Guide for NTP (Ubuntu is based in Debian), there exist a service integrated in systemd for processing the time synchronization. Maybe it need to be restarted to apply your changes:

systemctl restart timesyncd

or, if you wanted a full NTP server, you could install chrony as recommended, or ntpd as the traditional NTP daemon (an user installed NTP server will have priority over timesyncd).

Fjor
  • 196
  • 5
  • I updated my Q. – Marcel Stör Mar 23 '20 at 20:12
  • If the services aren't there maybe you need to install them using `apt-get install ntp`. In this [link](https://www.digitalocean.com/community/tutorials/how-to-set-up-time-synchronization-on-debian-10) is stated that Debian 10 already has `ntpd` running, so you could try the `ntpq` commands to test that (and the `ps` command looking for the related daemon). – Fjor Mar 25 '20 at 04:43
  • Also see the [Debian Wiki about NTP](https://wiki.debian.org/NTP). – Fjor Mar 25 '20 at 04:53
0

I think what is happening is when I setup my NTP server to test chronyd on clients. I made one change which I saw from another post that blew the door open. I kept getting the same thing when I ran #chronyc sources -v. I would get a status of ^?. I was able to ping the server and there was no routing involved. The post stated that it had something to do with geolocation checks. I saw another post that mentioned on how to setup the NTP Server and there were no upvotes for that person. In either case, what he suggested bridged the gap. On the NTP Server (running chrony) at /etc/chrony.conf. allow 192.168.168.0/24 local stratum 10 Local stratum 10 is already there but needs to be uncommented. Restarted services on both the server and client and now I see it working properly. #chronyc sources -v ^* SERVERIP Last Rx =19 JACKPOT. Other commands that helped me point to the solution was: #timedatectl show-timesync Failed to parse bus message: No route to host That error still shows so don't worry about that. #timedatectl show NTPSynchronized=yes Previously it had NTPSynchronized=no

Zaldy
  • 1