我面临着一个问题。 NTP服务器不会自动同步时间。 如果我改变系统的时间,那么NTP服务器不能纠正它。 重新启动NTP服务后,它会同步时间,否则不会。 检查日志也没有发现任何东西。
日志有这样的条目。 12月23日16:37:49 ntpd [5413]:ntpd退出信号15
ntpq -p的输出如下。
ntpq -p remote refid st t when poll reach delay offset jitter ============================================================================== *ns.creativecont 130.102.128.23 3 u 8 64 1 303.276 3.860 20.429 cachens2.onqnet 6.169.99.206 4 u 5 64 1 317.901 19.407 31.257 a.pool.ntp.uq.e 216.218.192.202 2 u 6 64 1 266.111 18.447 29.693 hosting.wireles 203.35.83.242 2 u 3 64 1 311.291 6.405 22.445 juniperberry.ca 193.79.237.14 2 u 12 64 1 185.838 -2.730 0.004 255.255.0.0 .BCST. 16 u - 64 0 0.000 0.000 0.004
请让我知道,如果任何人有任何解决办法。
这是由devise(假设你正在改变的时间大量)。 查看ntpd nan页面…
-g Normally, ntpd exits with a message to the system log if the offset exceeds the panic threshold, which is 1000 s by default. This option allows the time to be set to any value without restriction; however, this can happen only once. If the threshold is exceeded after that, ntpd will exit with a message to the system log. This option can be used with the -q and -x options. See the tinker command for other options.
如果您在NTP客户端上手动更改了足够的时间,那么NTP守护进程会发出奇怪的事情正在进行并退出。 通常系统的时钟只会漂移less量,ntpd会处理好。
如果你仍然有问题,那么试着用-D标志启动ntpd(以获得debugging信息) – 这应该会告诉你更详细的情况。
如果NTP客户端是虚拟机,那么您经常需要采取特殊措施来避免让两个系统试图控制时间 – 取决于您使用的平台。