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

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM