14
2023
01
14:23:53

执行ntpdate报错:no server suitable for synchronization found



推荐点击下面图片,通过本站淘宝优惠价购买:

image.png

最近在执行

ntpdate {ntp-server-ip}

报如下错误:

no server suitable for synchronization found
ntpdate -d {ntp-server-ip} #打开debug,可以看到:
Server dropped: Strata too high

这是因为NTP server还没有和其自身或者它的server同步上。
以下的定义是让NTP Server和其自身对峙同步,在/etc/ntp.conf中将local作为ntp server提供给ntp客户端。

server 127.127.1.0 
fudge 127.127.1.0 stratum 8

it is able to fudge itself (127.127.1.0 is the local ntpd server address, 8 is a number less than 16) (remember to restart ntpd). (fudge:蒙混过关,fudge itself自欺欺人)

chronyd server设置

如果服务端是chrony的话,需要修改chrony的conf文件/etc/chrony.conf
加入如下:

server 127.127.1.0 prefer
allow all
stratumweight 0
local stratum 10

重启systemctl restart chronyd

注意:目前总遇到一定时间后仍然报no server suitable

重启chronyd 





本文链接:https://hqyman.cn/post/3530.html 非本站原创文章欢迎转载,原创文章需保留本站地址!

分享到:





休息一下,本站随机推荐观看栏目:


« 上一篇 下一篇 »

发表评论:

◎欢迎参与讨论,请在这里发表您的看法、交流您的观点。

您的IP地址是: