我在自己的Red服务器上安装了一个非常简单的NTP服务器,配置非常基本:
driftfile /var/lib/ntp/drift
restrict default kod nomodify notrap
restrict -6 default kod nomodify notrap
restrict 127.0.0.1
restrict -6 ::1
restrict 192.168.200.0 mask 255.255.255.0 nomodify notrap
server 0.rhel.pool.ntp.org
includefile /etc/ntp/crypto/pw
keys /etc/ntp/keys如果我试图在本地主机上测试这一点,它似乎会正常工作:
ntpq -p localhost
remote refid st t when poll reach delay offset jitter
==============================================================================
gw-ge.esaote.co 62.48.53.90 3 u 56 64 173 81.474 -163823 67736.2如果我试图从远程机器查询它,结果是相同的:
ntpq -p 192.168.200.151
remote refid st t when poll reach delay offset jitter
==============================================================================
gw-ge.esaote.co 62.48.53.90 3 u - 64 367 75.500 -163838 61828.5但是,如果我调用ntpdate,则不起作用:
ntpdate 192.168.200.151
12 Mar 10:35:51 ntpdate[2688]: no server suitable for synchronization found发布于 2014-03-12 09:49:00
您的NTP服务器与池服务器太不同步了。您将注意到,ntpq -p输出中主机名之前最左边的字符是一个空格。如果NTP被同步到远程服务器,这将是一个*。还要注意非常大的offset值,它告诉您服务器上设置的时间是很远的。
停止NTP,执行ntpdate pool.ntp.org,并重新启动它。几分钟后,它应该会稳定下来并同步,然后您的客户应该能够查询它。
https://unix.stackexchange.com/questions/119294
复制相似问题