Ubuntu 服务器随机出现大量时间同步问题

Ubuntu 服务器随机出现大量时间同步问题

似乎我的服务器上的时间会随机向前跳几个小时。这种情况是随机发生的,我发现修复它的唯一方法是手动强制 NTP 调用。我没有在我的 ntp.conf 中看到任何不正常的地方,我似乎找不到任何可以表明为什么会发生这种情况的东西。

最近 3 次发生这种情况的情况如下:

  • 2014-10-08:时间偏移 -17593 秒
  • 2014-12-30:时间偏移 -13196 秒
  • 2015-01-01:时间偏移 -30783 秒

如您所见,日期似乎是随机的,时钟偏差量也是如此。这种情况大约在过去一年中以随机间隔发生。我之所以知道这些,是因为我添加了 cron 作业来强制确保每天重置日期,这不是一个好的或理想的解决方案。

有人能建议我去哪里查看导致这种随机漂移的原因吗?这是一个虚拟专用服务器。

我已附加我的 ntp.conf,希望这会有所帮助。

# /etc/ntp.conf, configuration for ntpd; see ntp.conf(5) for help

driftfile /var/lib/ntp/ntp.drift


# Enable this if you want statistics to be logged.
#statsdir /var/log/ntpstats/

statistics loopstats peerstats clockstats
filegen loopstats file loopstats type day enable
filegen peerstats file peerstats type day enable
filegen clockstats file clockstats type day enable

# Specify one or more NTP servers.

# Use servers from the NTP Pool Project. Approved by Ubuntu Technical Board
# on 2011-02-08 (LP: #104525). See http://www.pool.ntp.org/join.html for
# more information.
server 0.ubuntu.pool.ntp.org
server 1.ubuntu.pool.ntp.org
server 2.ubuntu.pool.ntp.org
server 3.ubuntu.pool.ntp.org

# Use Ubuntu's ntp server as a fallback.
server ntp.ubuntu.com

# Access control configuration; see /usr/share/doc/ntp-doc/html/accopt.html for
# details.  The web page <http://support.ntp.org/bin/view/Support/AccessRestrictions>
# might also be helpful.
#
# Note that "restrict" applies to both servers and clients, so a configuration
# that might be intended to block requests from certain clients could also end
# up blocking replies from your own upstream servers.

# By default, exchange time with everybody, but don't allow configuration.
restrict -4 default kod notrap nomodify nopeer noquery
restrict -6 default kod notrap nomodify nopeer noquery

# Local users may interrogate the ntp server more closely.
restrict 127.0.0.1
restrict ::1

# Clients from this (example!) subnet have unlimited access, but only if
# cryptographically authenticated.
#restrict 192.168.123.0 mask 255.255.255.0 notrust


# If you want to provide time to your local subnet, change the next line.
# (Again, the address is an example only.)
#broadcast 192.168.123.255

# If you want to listen to time broadcasts on your local subnet, de-comment the
# next lines.  Please do this only if you trust everybody on the network!
#disable auth
#broadcastclient

相关内容