0

On our Ubuntu 20.04 servers we run chrony as a time service. Unfortunately we always have time synchronization problems. It would be great if it ran always correctly for up to 0.05 seconds.

How can we fix this? What has to be switched off? How can you set chrony so that no problems arise? We have the standard configuration.

In addition, it would be nice if someone could say what I can check to find out why chrony can't synchronise sometimes:

systemctl status chrony
● chrony.service - chrony, an NTP client/server
     Loaded: loaded (/lib/systemd/system/chrony.service; enabled; vendor preset: enabled)
     Active: active (running) since Fri 2020-11-13 08:33:58 CET; 3 weeks 3 days ago
       Docs: man:chronyd(8)
             man:chronyc(1)
             man:chrony.conf(5)
   Main PID: 825 (chronyd)
      Tasks: 2 (limit: 2282)
     Memory: 2.0M
     CGroup: /system.slice/chrony.service
             ├─825 /usr/sbin/chronyd -F -1
             └─826 /usr/sbin/chronyd -F -1

Nov 13 08:33:58 server systemd[1]: Starting chrony, an NTP client/server...
Nov 13 08:33:58 server chronyd[825]: chronyd version 3.5 starting (+CMDMON +NTP +REFCLOCK +RTC +PRIVDROP +SCFILTER +SIGND +ASYNCDNS +SECHASH +IPV6 >
Nov 13 08:33:58 server chronyd[825]: Frequency -39.027 +/- 0.054 ppm read from /var/lib/chrony/chrony.drift
Nov 13 08:33:58 server chronyd[825]: Loaded seccomp filter
Nov 13 08:33:58 server systemd[1]: Started chrony, an NTP client/server.
Nov 13 08:34:02 server chronyd[825]: Selected source NTP Server IP
Nov 23 07:41:33 server chronyd[825]: Can't synchronise: no selectable sources
Nov 23 08:14:56 server chronyd[825]: Selected source NTP Server IP

Thanks in advance.

2

We are also sometimes having issues too, with chrony not been able to synchronize to the "NTP server service at the LAN".

Our problem is that the server which is been used as a "NTP time Master", is a Windows Server, previouslt 2008, then 2012R2, 2016, now 2019. Our system still uses legacy codes, and MS SQL, that's the reason for M$.

Other servers in the LAN are more and more Linux, Ubuntu variants, and Chrony is been used to synchronize the time to the Windows server.

It seems that the "w32tm time service server" has got some compatibility issues. w32tm works a bit differently with each of the different Windows Server versions we have used. With the latest Windows 2019 server, Chrony can't synchronize to the w32tm time until certain Windows updates have been installed. The Windows update KB4592440 makes the w32tm service answer better to the Linux chrony time queries, so make sure you have installed all Windows updates, if using Chrony to sync to the Windows Domain server.

Also, we have noticed that the type NTP, is better to use than NT5D5, which is "domain time", and needs domain auth.

One possibility would be to use Meinberg NTP daemon on the Windows server instead of the w32tm service. We have been testing that too, and it is a good alternative for Windows time.

One problem with chrony is that if the Windows domain time differs "too much" Chrony might think that the NTP time server is not reliable.

There are some settings which might be help on that in /etc/chrony/chrony.conf

maxdistance 16.0
makestep 1 3
maxupdateskew 100.0   

These may help if the ntpserver is not very stable.

Windows usually gives higher "root dispersion", 3 seconds or more, which makes chrony think that it is not a reliable source.

4
  • 1
    The question makes no mention of using Windows, so I'm not sure your advice would help with the OP's particular situation. You might consider writing your own Q&A instead to share your findings. – Zanna Mar 3 at 7:25
  • Can't synchronise: no selectable sources getting that too, might be cause by too high root dispersion, increasing maxdistance value, might help. – Jari A. Mar 8 at 21:55
  • thegeekdiary.com/… – Jari A. Mar 13 at 8:50

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.