ntpd同步,但chronyd失败

我使用chronyd设置时间服务器,但无法同步。

# chronyc sources 210 Number of sources = 5 MS Name/IP address Stratum Poll Reach LastRx Last sample =============================================================================== ^? smtp.visionnet.us 0 10 0 10y +0ns[ +0ns] +/- 0ns ^? nist1-lnk.binary.net 0 10 0 10y +0ns[ +0ns] +/- 0ns ^? c-73-98-218-154.hsd1.ut.c 0 10 0 10y +0ns[ +0ns] +/- 0ns ^? clock.xmission.com 0 10 0 10y +0ns[ +0ns] +/- 0ns ^? time-c.timefreq.bldrdoc.g 0 10 0 10y +0ns[ +0ns] +/- 0ns 

几个小时后,它仍然无法同步。

但是,如果我在相同的主机上使用相同的ntp服务器configurationntpd,它会立即同步:

 # ntpq -p remote refid st t when poll reach delay offset jitter ============================================================================== -lithium.constan 18.26.4.105 2 u 50 64 7 74.746 13.677 1.487 *nist1-lnk.binar .ACTS. 1 u 49 64 7 48.827 6.845 4.008 +c-73-98-218-154 .GPS. 1 u 47 64 7 12.792 2.418 1.338 +clock.xmission. .XMIS. 1 u 49 64 7 22.799 12.845 1.272 -time-c.timefreq .NIST. 1 u 49 64 7 59.498 -2.968 1.434 

如果我在两次尝试中都看到tcpdump,我可以看到当chrony尝试时,它发送一个NTPv4客户端数据包,我从来没有看到响应,但是当ntpd执行它时,我立即看到NTPv4客户端数据包和NTPv4服务器数据包。

有什么我失踪? 请问在udp 123以外的任何其他端口上, (我们确实有一个数据中心防火墙,需要打开一个洞才能出去,但是我不能动摇chronyd可能需要其他东西的感觉)

环境:

一个星期前系统是RHEL 7.3补丁

这是我的chrony.conf

 server us.pool.ntp.org iburst server time.nist.gov iburst server time.nc7j.com iburst server time.xmission.com iburst server time-c.timefreq.bldrdoc.gov iburst stratumweight 0 driftfile /var/lib/chrony/drift rtcsync makestep 10 3 bindcmdaddress 127.0.0.1 bindcmdaddress ::1 keyfile /etc/chrony.keys commandkey 1 generatecommandkey noclientlog logchange 0.5 logdir /var/log/chrony allow 0.0.0.0/0 

和比较,我的ntp.conf

 driftfile /var/lib/ntp/drift restrict default nomodify notrap nopeer noquery restrict -6 default kod nomodify notrap nopeer noquery restrict 127.0.0.1 restrict ::1 server us.pool.ntp.org iburst server time.nist.gov iburst server time.nc7j.com iburst server time.xmission.com iburst server time-c.timefreq.bldrdoc.gov iburst includefile /etc/ntp/crypto/pw keys /etc/ntp/keys disable monitor logfile /var/log/ntp.log 

不同之处在于,chronyd默认使用每个客户端请求的随机源端口。 如果防火墙不允许来自123以外的端口的客户端请求,则需要通过将acquisitionport 123添加到chrony.conf来指定端口。 这个指令logging在这里 。