你好目前我有一个本地ntp服务器(慢性)和ntp客户端(慢性),都工作,但是当我试图改变ntp服务器时间说从当前时间减6年。 ntp客户端无法同步它,它只会在syslog上说:
1月9日17:29:11本地主机chronyd [9192]:系统时钟错误6780812.328260秒,开始调整
ntp客户端(chrony)/etc/chrony.conf是默认的configuration,除了服务器指向我的本地NTP服务器(慢性)。 这是我的configuration
# Use public servers from the pool.ntp.org project. # Please consider joining the pool (http://www.pool.ntp.org/join.html). #server 0.centos.pool.ntp.org iburst #server 1.centos.pool.ntp.org iburst #server 2.centos.pool.ntp.org iburst #server 3.centos.pool.ntp.org iburst server local.ntp.server iburst # Ignore stratum in source selection. stratumweight 0 # Record the rate at which the system clock gains/losses time. driftfile /var/lib/chrony/drift # Enable kernel RTC synchronization. rtcsync # In first three updates step the system clock instead of slew # if the adjustment is larger than 10 seconds. makestep 10 3 # Allow NTP client access from local network. #allow 192.168/16 # Listen for commands only on localhost. bindcmdaddress 127.0.0.1 bindcmdaddress ::1 # Serve time even if not synchronized to any NTP server. #local stratum 10 keyfile /etc/chrony.keys # Specify the key used as password for chronyc. commandkey 1 # Generate command key if missing. generatecommandkey # Disable logging of client accesses. noclientlog # Send a message to syslog if a clock adjustment is larger than 0.5 seconds. logchange 0.5 logdir /var/log/chrony #log measurements statistics tracking
我不知道它不会同步,我已经读过,这将需要更长的时间,但我已经让我的机器坐了一天,仍然ntp客户端没有没有相同的时间作为ntp服务器(不同步) 。 有任何想法吗? 我试着不重新启动chronyd服务,只是让它自动同步的时间
请注意,“local.ntp.server”是在我的/ etc / hosts上定义的。 此外,NTP服务器和NTP客户端不使用ntpd服务,但它使用chronyd。 而这种设置是孤立的
你的问题似乎是你试图通过歪曲时间完成六年的时间变化,并在一天之后放弃。
如果偏移algorithm漂移时钟多达百分之一 – 这是相当多 – 这将需要六百年的时间歪斜了很多。 即使时钟完全静止 ,也需要六年的时间才能退步六年。 在不到六年的时间里,实现六年的倒退时间漂移的唯一方法就是倒退 ,我认为任何事情都不会有什么反应。 要在一天内做到这一点,就意味着将时钟倒退至实时速率的两千倍以上!
我的感觉是,运行NTP服务器是一个非常糟糕的主意,但是如果你坚持这样做,而你突然倾斜了大量的服务器,你将需要强制改变客户端的时钟,然后才有机会同步。 通过确保客户机在启动时强制重置服务器的时钟(使用ntpd ,这是在启动时使用ntpdate完成的;我不知道关于时间的情况)并重新启动客户机,这是最容易完成的。