chronyd不同步的坑处理

发现chronyd配置好后,状态也可以,就是没有同步

systemctl status chronyd

这个时候查看手册

[root@POC_STRADE02 ~]# man chrony.conf |grep  maxdistance

maxdistance distance
The maxdistance directive sets the maximum allowed root distance of the sources to not be rejected by the source selection algorithm. The distance includes the accumulated dispersion, which might be large
when the source is no longer synchronised, and half of the total round-trip delay to the primary source.

By default, the maximum root distance is 3 seconds.

Setting maxdistance to a larger value can be useful to allow synchronisation with a server that only has a very infrequent connection to its sources and can accumulate a large dispersion between updates of
its clock.

[root@POC_STRADE02 ~]#

这段的坑是,当服务器重启后,读取硬件时钟的时间如果和chronyd同步的源时间相差3秒以上,就不会进行同步

需要再配置文件里最后一行加一段配置,

vim /etc/chrony.conf

加入如下,我设置的是600秒

maxdistance 600.0

 

posted @ 2021-09-15 16:18  鸾舞春秋  阅读(2417)  评论(0编辑  收藏  举报