Solved: Chronyc NTP error on RHEL for not syncing time ?

Sometimes it happens the chronyc daemon does not synchronize the time on RHEL systems.

It happens when the system polls the server after a long time.

I. Check current time status.

[root@ngelinux001 ~]# chronyc tracking
Reference ID    : 8B63F005 (NGEL-6804-gw.ngelinux.com)
Stratum         : 9
Ref time (UTC)  : Fri Sep 09 15:39:12 2022
System time     : 0.000268059 seconds fast of NTP time
Last offset     : +0.000358613 seconds
RMS offset      : 0.000674250 seconds
Frequency       : 8.816 ppm slow
Residual freq   : +0.013 ppm
Skew            : 0.832 ppm
Root delay      : 0.077097327 seconds
Root dispersion : 0.006548019 seconds
Update interval : 1028.0 seconds
Leap status     : Normal
[root@ngelinux001 ~]#

 

II. Check out the configuration and make necessary changes.
We have defined the options minpoll, maxpoll, and polltarget options.

[root@ngelinux001 ~]# tail /etc/chrony.conf

# Get TAI-UTC offset and leap seconds from the system tz database.
leapsectz right/UTC

# Specify directory for log files.
logdir /var/log/chrony

# Select which information is logged.
#log measurements statistics tracking
server ntp-NGELdc.ngelinux.com minpoll 4 maxpoll 6 polltarget 16
[root@ngelinux001 ~]#

 

III. Now restart the service and check status

[root@ngelinux001 ~]# service chronyd restart
[root@ngelinux001 ~]# chronyc tracking
Reference ID    : 8B63F005 (NGEL-6804-gw.ngelinux.com)
Stratum         : 9
Ref time (UTC)  : Fri Sep 09 16:00:46 2022
System time     : 0.000006497 seconds slow of NTP time
Last offset     : +0.003102540 seconds
RMS offset      : 0.003102540 seconds
Frequency       : 8.793 ppm slow
Residual freq   : +10.489 ppm
Skew            : 0.624 ppm
Root delay      : 0.077732861 seconds
Root dispersion : 0.003618809 seconds
Update interval : 0.0 seconds
Leap status     : Normal
[root@ngelinux001 ~]#

minpoll and maxpoll defines the minimum and maximum poll times to NTP server, which by default is 60 and 1024 seconds.

The default polltarget is 8, higher target means shorter polling period.

polltarget value defines the target number of regressions performed by chronyd to adjust the polling interval between minpoll and maxpoll.

The above trick will make your system to poll the server frequently and hence the clock skew issue should be fixed by now.

0 0 votes
Article Rating
Subscribe
Notify of
guest

0 Comments
Newest
Oldest Most Voted
Inline Feedbacks
View all comments