我正在从一台服务器转移到另一台服务器。相同的配置、更新的硬件、相同的数据中心。新机器可以讲NTP:
$ sudo ntpdate -d ntp.jentfoo.com
Password:
24 Aug 14:50:59 ntpdate[10935]: ntpdate [email protected] Sun Aug 24 17:40:33 UTC 2014 (1)
Looking for host ntp.jentfoo.com and service ntp
host found : stripes.jentfoo.com
transmit(173.203.211.73)
receive(173.203.211.73)
transmit(173.203.211.73)
receive(173.203.211.73)
transmit(173.203.211.73)
receive(173.203.211.73)
transmit(173.203.211.73)
receive(173.203.211.73)
server 173.203.211.73, port 123
stratum 2, precision -20, leap 00, trust 000
refid [173.203.211.73], delay 0.04141, dispersion 0.00014
transmitted 4, in filter 4
reference time: d7a4aec6.c2942e94 Sun, Aug 24 2014 14:34:46.760
originate timestamp: d7a4b299.ef951806 Sun, Aug 24 2014 14:51:05.935
transmit timestamp: d7a4b29a.0400cdfd Sun, Aug 24 2014 14:51:06.015
filter delay: 0.04141 0.04160 0.04147 0.04152
0.00000 0.00000 0.00000 0.00000
filter offset: -0.08754 -0.08769 -0.08770 -0.08774
0.000000 0.000000 0.000000 0.000000
delay 0.04141, dispersion 0.00014
offset -0.087543
24 Aug 14:51:06 ntpdate[10935]: adjust time server 173.203.211.73 offset -0.087543 sec
所以不存在防火墙问题。但无论我让它运行多久,ntpd 服务器都不会与其对等服务器同步:
$ ntpq 127.0.0.1
ntpq> pe
remote refid st t when poll reach delay offset jitter
==============================================================================
andromeda.cs.pu .INIT. 16 - - 1024 0 0.000 0.000 0.000
ns.nts.umn.edu .INIT. 16 - - 1024 0 0.000 0.000 0.000
stan.greyware.c .INIT. 16 - - 1024 0 0.000 0.000 0.000
stripes.jentfoo .INIT. 16 - - 1024 0 0.000 0.000 0.000
ntpq> as
ind assid status conf reach auth condition last_event cnt
===========================================================
1 18223 8011 yes no none reject mobilize 1
2 18224 8011 yes no none reject mobilize 1
3 18225 8011 yes no none reject mobilize 1
4 18226 8011 yes no none reject mobilize 1
ntpq> rv
associd=0 status=c012 leap_alarm, sync_unspec, 1 event, freq_set,
version="ntpd [email protected] Sun Aug 24 17:40:33 UTC 2014 (1)",
processor="x86_64", system="Linux/3.15.5-hardened-r2", leap=11,
stratum=16, precision=-23, rootdelay=0.000, rootdisp=355.605, refid=INIT,
reftime=00000000.00000000 Sun, Dec 31 1899 19:00:00.000,
clock=d7a510c6.0be8b4ee Sun, Aug 24 2014 21:32:54.046, peer=0, tc=3,
mintc=4, offset=0.000, frequency=0.000, sys_jitter=0.000,
clk_jitter=0.000, clk_wander=0.000
ntpq> rv 18226
associd=18226 status=8011 conf, sel_reject, 1 event, mobilize,
srcadr=stripes.jentfoo.com, srcport=123, dstadr=0.0.0.0, dstport=0,
leap=11, stratum=16, precision=-23, rootdelay=0.000, rootdisp=0.000,
refid=INIT, reftime=00000000.00000000 Sun, Dec 31 1899 19:00:00.000,
rec=00000000.00000000 Sun, Dec 31 1899 19:00:00.000, reach=000,
unreach=34, hmode=3, pmode=0, hpoll=10, ppoll=10, headway=0,
flash=1600 peer_stratum, peer_dist, peer_unreach, keyid=0, offset=0.000,
delay=0.000, dispersion=15937.500, jitter=0.000,
filtdelay= 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00,
filtoffset= 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00,
filtdisp= 16000.0 16000.0 16000.0 16000.0 16000.0 16000.0 16000.0 16000.0
我不明白为什么。旧服务器使用完全相同的配置,并且运行良好。我不知道该怎么办。
更新:ntpd 已运行过夜并且:
2014-08-24 14:57:46.244875500 Starting ntpd ...
2014-08-24 14:57:46.246304500 Finished Parsing!!
... normal startup status ...
2014-08-25 01:24:53.871674500 receive: at 975 0.0.0.0<-212.1.209.194 mode 3 len 48
2014-08-25 01:24:53.871699500 transmit: at 975 0.0.0.0->212.1.209.194 mode 4 len 48
2014-08-25 01:24:53.871700500 receive: at 1117 0.0.0.0<-212.1.209.194 mode 3 len 48
2014-08-25 01:24:53.871700500 transmit: at 1117 0.0.0.0->212.1.209.194 mode 4 len 48
2014-08-25 01:24:53.871700500 receive: at 1300 0.0.0.0<-198.23.230.118 mode 3 len 48
2014-08-25 01:24:53.871701500 transmit: at 1300 0.0.0.0->198.23.230.118 mode 4 len 48
2014-08-25 01:24:53.871701500 receive: at 2115 0.0.0.0<-66.172.12.144 mode 3 len 48
2014-08-25 01:24:53.871725500 transmit: at 2115 0.0.0.0->66.172.12.144 mode 4 len 48
2014-08-25 01:24:53.871725500 auth_agekeys: at 4096 keys 1 expired 0
2014-08-25 01:24:53.871725500 auth_agekeys: at 8192 keys 1 expired 0
2014-08-25 01:24:53.871726500 auth_agekeys: at 12288 keys 1 expired 0
... more of the same ...
它似乎确实正在发送/接收。除了现在的答案之外,所有ntpq
输出都是相同的。rv 18226
unreach=69