NTP 无法同步或找不到合适的服务器

NTP 无法同步或找不到合适的服务器

我正在尝试解决的问题是 NTP 无法同步:

$ sudo ntpstat
unsynchronised
  time server re-starting
   polling server every 64 s

编辑:这是一些 ntpq 输出:

$ sudo ntpq -c peers
     remote           refid      st t when poll reach   delay   offset  jitter
==============================================================================
 ntp.eecs.wsu.ed .INIT.          16 u    -   64    0    0.000    0.000   0.000
 71.19.224.242   .INIT.          16 u    -   64    0    0.000    0.000   0.000
 ntp4.vps.net    .INIT.          16 u    -   64    0    0.000    0.000   0.000
 mercury.z0p.org .INIT.          16 u    -   64    0    0.000    0.000   0.000
 li506-17.member .INIT.          16 u    -   64    0    0.000    0.000   0.000
 4.53.160.75     .INIT.          16 u    -   64    0    0.000    0.000   0.000
 ntp1.ResComp.Be .INIT.          16 u    -   64    0    0.000    0.000   0.000

我有默认的 RHEL6 /etc/ntp.conf 配置。服务器位:

server 0.rhel.pool.ntp.org
server 1.rhel.pool.ntp.org
server 2.rhel.pool.ntp.org

当我停止 ntpd 并尝试手动运行 ntpdate 时,所有这些服务器都显示“未找到适合同步的服务器”。以下是带有调试输出的 ntpdate:

$ ntpdate -dq 1.rhel.pool.ntp.org
10 May 10:02:42 ntpdate[13320]: ntpdate [email protected] Thu May 13 14:38:25 UTC 2010 (1)
Looking for host 1.rhel.pool.ntp.org and service ntp
host found : caprica.willglynn.com
transmit(208.88.126.226)
transmit(66.225.61.66)
transmit(149.20.68.17)
transmit(4.53.160.75)
transmit(208.88.126.226)
transmit(66.225.61.66)
transmit(149.20.68.17)
transmit(4.53.160.75)
transmit(208.88.126.226)
transmit(66.225.61.66)
transmit(149.20.68.17)
transmit(4.53.160.75)
transmit(208.88.126.226)
transmit(66.225.61.66)
transmit(149.20.68.17)
transmit(4.53.160.75)
transmit(208.88.126.226)
transmit(66.225.61.66)
transmit(149.20.68.17)
transmit(4.53.160.75)
208.88.126.226: Server dropped: no data
66.225.61.66: Server dropped: no data
149.20.68.17: Server dropped: no data
4.53.160.75: Server dropped: no data
server 208.88.126.226, port 123
stratum 0, precision 0, leap 00, trust 000
refid [208.88.126.226], delay 0.00000, dispersion 64.00000
transmitted 4, in filter 4
reference time:    00000000.00000000  Thu, Feb  7 2036  1:28:16.000
originate timestamp: 00000000.00000000  Thu, Feb  7 2036  1:28:16.000
transmit timestamp:  d5377c86.25dd5f5a  Fri, May 10 2013 10:02:46.147
filter delay:  0.00000  0.00000  0.00000  0.00000
         0.00000  0.00000  0.00000  0.00000
filter offset: 0.000000 0.000000 0.000000 0.000000
         0.000000 0.000000 0.000000 0.000000
delay 0.00000, dispersion 64.00000
offset 0.000000

server 66.225.61.66, port 123
stratum 0, precision 0, leap 00, trust 000
refid [66.225.61.66], delay 0.00000, dispersion 64.00000
transmitted 4, in filter 4
reference time:    00000000.00000000  Thu, Feb  7 2036  1:28:16.000
originate timestamp: 00000000.00000000  Thu, Feb  7 2036  1:28:16.000
transmit timestamp:  d5377c86.591061f7  Fri, May 10 2013 10:02:46.347
filter delay:  0.00000  0.00000  0.00000  0.00000
         0.00000  0.00000  0.00000  0.00000
filter offset: 0.000000 0.000000 0.000000 0.000000
         0.000000 0.000000 0.000000 0.000000
delay 0.00000, dispersion 64.00000
offset 0.000000

server 149.20.68.17, port 123
stratum 0, precision 0, leap 00, trust 000
refid [149.20.68.17], delay 0.00000, dispersion 64.00000
transmitted 4, in filter 4
reference time:    00000000.00000000  Thu, Feb  7 2036  1:28:16.000
originate timestamp: 00000000.00000000  Thu, Feb  7 2036  1:28:16.000
transmit timestamp:  d5377c86.8c427d35  Fri, May 10 2013 10:02:46.547
filter delay:  0.00000  0.00000  0.00000  0.00000
         0.00000  0.00000  0.00000  0.00000
filter offset: 0.000000 0.000000 0.000000 0.000000
         0.000000 0.000000 0.000000 0.000000
delay 0.00000, dispersion 64.00000
offset 0.000000

server 4.53.160.75, port 123
stratum 0, precision 0, leap 00, trust 000
refid [4.53.160.75], delay 0.00000, dispersion 64.00000
transmitted 4, in filter 4
reference time:    00000000.00000000  Thu, Feb  7 2036  1:28:16.000
originate timestamp: 00000000.00000000  Thu, Feb  7 2036  1:28:16.000
transmit timestamp:  d5377c86.bf762a87  Fri, May 10 2013 10:02:46.747
filter delay:  0.00000  0.00000  0.00000  0.00000
         0.00000  0.00000  0.00000  0.00000
filter offset: 0.000000 0.000000 0.000000 0.000000
         0.000000 0.000000 0.000000 0.000000
delay 0.00000, dispersion 64.00000
offset 0.000000

10 May 10:02:47 ntpdate[13320]: no server suitable for synchronization found

我可以 ping 池指向的一些 NTP 服务器:

$ ping caprica.willglynn.com
PING caprica.willglynn.com (208.88.126.226) 56(84) bytes of data.
64 bytes from caprica.willglynn.com (208.88.126.226): icmp_seq=1 ttl=52 time=60.2 ms
64 bytes from caprica.willglynn.com (208.88.126.226): icmp_seq=2 ttl=52 time=59.6 ms
64 bytes from caprica.willglynn.com (208.88.126.226): icmp_seq=3 ttl=52 time=59.9 ms
64 bytes from caprica.willglynn.com (208.88.126.226): icmp_seq=4 ttl=52 time=59.8 ms

端口 123 的 Netstat:

$ netstat -ano|grep 123
udp        0      0 10.0.116.6:123              0.0.0.0:*                               off (0.00/0/0)
udp        0      0 127.0.0.1:123               0.0.0.0:*                               off (0.00/0/0)
udp        0      0 0.0.0.0:123                 0.0.0.0:*                               off (0.00/0/0)
udp        0      0 :::123                      :::*                                    off (0.00/0/0)

iptables 和 ip6tables 已关闭,但有一个外部防火墙应该为 UDP 打开端口 123。

答案1

确保计算机与互联网其余部分之间没有外部防火墙。如果有,请要求管理防火墙的人员打开端口 123。

相关内容