linux – NTP不更新CentOS中的服务器时间
发布时间:2020-12-14 02:50:06 所属栏目:Linux 来源:网络整理
导读:我编译了ntp for arm 我的NTP客户端没有更新任何服务器的时间 我提到了帖子“为什么ntpd不能更新服务器上的时间?(7)” 但没有任何效果.. 这是ntpq -pn的输出 [Tue May 15 13:18:26 root@Unknown:bin]$./ntpq -pn remote refid st t when poll reach delay o
我编译了ntp for arm
我的NTP客户端没有更新任何服务器的时间 我提到了帖子“为什么ntpd不能更新服务器上的时间?(7)” 但没有任何效果.. 这是ntpq -pn的输出 [Tue May 15 13:18:26 root@Unknown:bin]$./ntpq -pn remote refid st t when poll reach delay offset jitter ============================================================================== 125.62.193.121 .INIT. 16 u - 16 0 0.000 0.000 0.000 我了解到refid不应该是“.INIT”而延迟,偏移,抖动值不应该是0 在观看ntpd的日志时 [Tue May 15 13:19:08 root@Unknown:bin]$tail -f ntp.log 15 May 12:29:35 ntpd[18175]: proto: precision = 1000.000 usec 15 May 12:29:35 ntpd[18175]: ntp_io: estimated max descriptors: 1024,initial socket boundary: 15 May 12:29:35 ntpd[18175]: Listen and drop on 0 v4wildcard 0.0.0.0 UDP 123 15 May 12:29:35 ntpd[18175]: Listen normally on 1 lo 127.0.0.1 UDP 123 15 May 12:29:35 ntpd[18175]: Listen normally on 2 eth1 173.39.19.72 UDP 123 15 May 12:29:35 ntpd[18175]: peers refreshed 15 May 12:29:35 ntpd[18175]: Listening on routing socket on fd #19 for interface updates 在旁注 – server 91.189.94.4 minpoll 4 maxpoll 4 以上IP适用于ntp.ubuntu.com. [Fri May 18 15:12:26 root@Unknown:~]$ping pool.ntp.org PING pool.ntp.org (202.71.140.36): 56 data bytes 64 bytes from 202.71.140.36: seq=0 ttl=53 time=40.000 ms 64 bytes from 202.71.140.36: seq=1 ttl=53 time=39.000 ms 64 bytes from 202.71.140.36: seq=2 ttl=53 time=39.000 ms 64 bytes from 202.71.140.36: seq=3 ttl=53 time=39.000 ms Ping工作,但服务器永远不会更新它的时间 解决方法
您的ntpd认为远程系统是第16层(意味着它的可靠时间最短).大多数ntp客户端都不会与这样的系统同步.我强烈推荐使用pool.ntp.org
as described in their directions.
他们的示例ntp.conf文件: driftfile /var/lib/ntp/ntp.drift server 0.pool.ntp.org server 1.pool.ntp.org server 2.pool.ntp.org server 3.pool.ntp.org 此外,您不应该在配置文件中使用IP,除非您的系统不通过某些疯狂的要求支持DNS解析. 更新: server 0.in.pool.ntp.org server 1.in.pool.ntp.org server 2.in.pool.ntp.org server 3.in.pool.ntp.org 相同的漂移,记录和其他选项仍然适用. (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |
相关内容