NTP 与美国芝加哥时间 - 问题

NTP 与美国芝加哥时间 - 问题

我们正在尝试使用芝加哥时间配置 NTP,但它显示 st 16u。还看不到对 amy 远程服务器的任何引用 (*)。

>>ntpq -p

     remote           refid      st t when poll reach   delay   offset  jitter

==============================================================================

 nist1-chi.ustim .INIT.          16 u    - 1024    0    0.000    0.000   0.000    
 zeus.yocum.org  .INIT.          16 u    - 1024    0    0.000    0.000   0.000
 conquest.kjsl.c .INIT.          16 u    - 1024    0    0.000    0.000   0.000
 stratum-2-core- .INIT.          16 u    - 1024    0    0.000    0.000   0.000
 vimo.dorui.net  .INIT.          16 u    - 1024    0    0.000    0.000   0.000

配置细节如下:[cat /etc/ntp.conf]

 # Permit time synchronization with our time source, but do not
 # permit the source to query or modify the service on this system.
restrict default kod nomodify notrap nopeer noquery

 # Permit all access over the loopback interface.  This could
 # be tightened as well, but to do so would effect some of
 # the administrative functions.
restrict 127.0.0.1 

 # Hosts on local network are less restricted.
 #restrict 192.168.16.0 mask 255.255.255.0 nomodify notrap

 # Use public servers from the pool.ntp.org project.
 # Please consider joining the pool (http://www.pool.ntp.org/join.html).
 #server 0.rhel.pool.ntp.org
 #server 1.rhel.pool.ntp.org
 #server 2.rhel.pool.ntp.org

server nist1-chi.ustiming.org
server 0.north-america.pool.ntp.org
server 1.north-america.pool.ntp.org
server 2.north-america.pool.ntp.org
server 3.north-america.pool.ntp.org

 #broadcast 192.168.1.255 key 42         # broadcast server
 #broadcastclient                        # broadcast client
 #broadcast 224.0.1.1 key 42             # multicast server
 #multicastclient 224.0.1.1              # multicast client
 #manycastserver 239.255.254.254         # manycast server
 #manycastclient 239.255.254.254 key 42  # manycast client

 # Undisciplined Local Clock. This is a fake driver intended for backup
 # and when no outside source of synchronized time is available. 
 #server 127.127.1.0     # local clock
fudge   127.127.1.0 stratum 10

 # Drift file.  Put this in a directory which the daemon can write to.
 # No symbolic links allowed, either, since the daemon updates the file
 # by creating a temporary in the same directory and then rename()'ing
 # it to the file.
driftfile /var/lib/ntp/drift

 # Key file containing the keys and key identifiers used when operating
 # with symmetric key cryptography. 
keys /etc/ntp/keys

 # Specify the key identifiers which are trusted.
 #trustedkey 4 8 42

 # Specify the key identifier to use with the ntpdc utility.
 #requestkey 8

 # Specify the key identifier to use with the ntpq utility.
 #controlkey 8

答案1

看起来您无法访问任何 NTP 服务器:

“reach” 字段实际上是一个寄存器(以八进制数字格式显示),每次轮询前都会向左移动一位。如果轮询成功,则寄存器与 001(八进制)进行或运算。

“健康” 的 ntp 应该具有 377 的“可达性”,如下所示:

ntpq> pee
     remote           refid      st t when poll reach   delay   offset  jitter
==============================================================================
 LOCAL(0)        .LOCL.          10 l   52   64  377    0.000    0.000   0.001
*myLocalNTP      .PPS.            1 u  169  256  377    0.484   89.023  32.295

这可能是防火墙/SELinux 问题。请检查您是否可以访问远程 ntpserver(ntpdate servername 应该可以解决问题)。如果失败,traceroute -U -p 123 servername 可能会帮助您找出哪个节点正在丢弃您的 ntp 数据包。

答案2

请注意,本质上没有“芝加哥时间”。一切都与 UTC 协调,时区设置为本地时间(例如,CDT = UTC-5)。

当您停止 ntpd 守护程序并运行“ntpdate 0.pool.ntp.org”时会发生什么?您是否得到了很大的偏移量?我想知道您是否试图在 ntpd 上强制使用芝加哥时间,但您的时间差异太大而无法协调(即,您的计算机认为芝加哥时间实际上是 UTC,因此偏移量为 18000 秒)。

答案3

看一眼帖子和整个主题。有人遇到了和你类似的问题。此外,主题中还显示了可帮助你调试问题的命令。

相关内容