我有两个没有互联网的centos服务器,我试着启用孤儿模式,所以它们彼此同步,但它们之间的时间仍然不同步。
在我的设置和命令输出下面找到
#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
driftfile /var/lib/chrony/drift
makestep 1.0 3
rtcsync
local stratum 10 orphan
logdir /var/log/chrony
allow 192.168.0.0/20 Local time: Fri 2019-10-11 16:28:06 CEST
Universal time: Fri 2019-10-11 14:28:06 UTC
RTC time: Fri 2019-10-11 14:28:06
Time zone: Europe/Berlin (CEST, +0200)
NTP enabled: yes
NTP synchronized: no
RTC in local TZ: no
DST active: yes
Last DST change: DST began at
Sun 2019-03-31 01:59:59 CET
Sun 2019-03-31 03:00:00 CEST
Next DST change: DST ends (the clock jumps one hour backwards) at
Sun 2019-10-27 02:59:59 CEST
Sun 2019-10-27 02:00:00 CET210 Number of sources = 0
MS Name/IP address Stratum Poll Reach LastRx Last sample
===============================================================================Reference ID : 7F7F0101 ()
Stratum : 10
Ref time (UTC) : Fri Oct 11 14:28:35 2019
System time : 0.000000000 seconds fast of NTP time
Last offset : +0.000000000 seconds
RMS offset : 0.000000000 seconds
Frequency : 0.000 ppm slow
Residual freq : +0.000 ppm
Skew : 0.000 ppm
Root delay : 0.000000000 seconds
Root dispersion : 0.000000000 seconds
Update interval : 0.0 seconds
Leap status : Normal发布于 2019-10-12 00:59:33
您的配置不正确,因为这不是设计孤立模式的方式。孤立模式旨在为一组配置好的对等点提供足够的时间同步,以便在底层服务器无法访问时进行有限的时间同步。它不是为支持完全脱机操作而设计的(NTP不是那样工作的)。
您的服务器没有相互同步,因为您的配置不包括它们作为对等服务器,并且没有一个服务器与低层服务器同步。
阅读有关孤儿模式的更多信息:
https://serverfault.com/questions/987658
复制相似问题