NTP time sync failures on Debian

9,489

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).

Share:
9,489

Related videos on Youtube

Marcel Stör
Author by

Marcel Stör

Updated on September 18, 2022

Comments

  • Marcel Stör
    Marcel Stör almost 2 years

    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.
    
    • stueja
      stueja almost 4 years
      It is systemd-timesyncd.
    • Marianne
      Marianne over 3 years
      The service is named systemd-timesyncd on Ubuntu
  • Marcel Stör
    Marcel Stör over 4 years
    I updated my Q.
  • Fjor
    Fjor over 4 years
    If the services aren't there maybe you need to install them using apt-get install ntp. In this link 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
    Fjor over 4 years
    Also see the Debian Wiki about NTP.