Because ntpd was replaced by chrony in Votiro Cloud v9.6.174, you may need to configure NTP using the steps below.
|1.||Verify the currently used service/daemon (ntpd or chronyd) for NTP by running the commands below:|
systemctl list-units --type=service -all | grep ntpd
systemctl list-units --type=service -all | grep chrony
|t||If ntpd is disabled and chronyd is used, the command outputs should like this:|
|t||If ntpd is active, run the following commands to disable ntpd:|
systemctl stop ntpd.service
systemctl disable ntpd.service
|2.||To check if the clock is synchronized, run the following command:|
timedatectl | grep synchronized
|t||If synchronized, the command output should display synchronized: yes, as shown:|
|t||If it’s not synchronized, troubleshoot using the following steps:|
|||Check the chrony service status by running one of the following commands (the output is the same):|
systemctl status chronyd
systemctl status chrony.service
|||Start/restart the chrony service/daemon using one of the following commands:|
systemctl restart chronyd
systemctl restart chrony.service
|||If the service is running, run the following command to verify the synchronization of the local system with the reference server:|
|||Run the following command to display information about the current time sources that chronyd is accessing:|
chronyc sources -v
|||To display the information about the drift rate and offset estimation process for each of the sources listed by chronyd, run the following command:|
|||To edit the chrony configuration, run the command:|
For example, with public servers:
Note After each action or saved change on the chrony.conf file, a service restart is required.
Troubleshooting Example: NTP not synchronized with external server
Although all servers were configured properly, when running the sources command, “last sample” showed a gap of 10.8s between the servers as shown:
To resolve this behavior, we added a parameter called “maxdistance” with a value of 15 to mitigate this gap.
Root cause: in the "chrony sources" output, "+/- 10.8 s" is larger than the default “maxdistance” of 3 seconds (if not part of the chrony.conf). The maxdistance parameter was added in chrony-2.2, so that's why it worked with chrony-2.1. Older versions only have a hardcoded limit for the root dispersion to be smaller than 16 seconds. The NTP server has a root dispersion of about 3.6 seconds.