ECS:xDoctor:RAP081: 症状代码:2048:所有 NTP 服务器都不适合同步

Summary: xDoctor 检测到网络时间协议 (NTP) 守护程序问题。

This article applies to This article does not apply to This article is not tied to any specific product. Not all product versions are identified in this article.

Symptoms

ECS 机架中的所有节点都应运行 NTP 守护程序,并且配置的 NTP 服务器应能够同步时间。否则,这可能会导致前端数据接收出现问题。

症状

消息

NTP_NOT_SUITABLE_ERROR

消息 = 所有 NTP 服务器都不适合同步。
额外 = [节点列表]

Cause

如果上述症状在 24 小时内未出现,则仍为“警告”。
24 小时后,如果此问题持续存在,严重性将增加到 ERROR,并报告 RAP081。

Resolution

这意味着在“额外”字段中列出的每个节点上都无法与 NTP 服务器同步。

验证:
1.获取列出的每个节点上的 NTP 服务器列表:

命令:

# getrackinfo -r |grep NTP

示例:

admin@node1:~> getrackinfo -r | grep NTP
NTPServer = xxx.xxx.xxx.xxx

2.对于步骤 1 中列出的每个 NTP 服务器,测试它是否能够同步时间。

命令:

# sudo ntpdate -p 2 -d <NTP IP Address / NTP FQDN>

# sudo ntpdate -p 2 -d 'getrackinfo -r |grep NTP |grep -oP “(?:[0-9]{1,3}\.){3}[0-9]{1,3}“'

示例(能够同步时间):

admin@node1:~> sudo ntpdate -p 2 -d xxx.xxx.xxx.xxx
22 Feb 13:47:48 ntpdate[110901]: ntpdate 4.2.8p11@1.3728-o Thu Jun 14 09:26:52 UTC 2018 (1)
Looking for host <NTP IP Address> and service ntp NTP
<IP Address> reversed to <NTP hostname>
host found :<NTP hostname>
transmit(<NTP IP Address>)
receive(<NTP IP Address>)
transmit(<NTP IP Address>)
receive(<NTP IP Address>)
server <NTP IP Address>, port 123
stratum 2, precision -24, leap 00, trust 000
refid [<NTP IP Address>], delay 0.02615, dispersion 0.00003
transmit 2, in filter 2
reference time:    e01a7b0d.af9e6616 2019 年 2 月 22 日星期五 13:43:41.686
起源时间戳:e01a7c06.748e0c65 2019 年 2 月 22 日星期五 13:47:50.455
传输时间戳:  e01a7c06.7478b000 Fri, Feb 22 2019 13:47:50.454
filter delay:  0.02635 0.02615 0.00000 0.00000
0.00000 0.00000 0.00000 0.00000
过滤器偏移量:0.000043 -0.00002 0.000000 0.000000
0.000000 0.000000 0.000000 0.000000
延迟 0.02615, 色散 0.00003
偏移 -0.000022

22 Feb 13:47:50 ntpdate[110901]: adjust time server <NTP IP address> offset -0.000022 sec

示例:(如果无法同步其输出的时间)

admin@node1:~> sudo ntpdate -p 2 -d xxx.xxx.xxx.xxx
22 Feb 13:47:48 ntpdate[110901]: ntpdate 4.2.8p11@1.3728-o Thu Jun 14 09:26:52 UTC 2018 (1)
Looking for host <NTP IP Address> and service ntp NTP
<IP Address> reversed to <NTP hostname>
host found :<NTP hostnametransmit(<NTP IP Address>)
transmit(<NTP IP Address>)
transmit(<NTP IP Address>)

server <NTP IP Address>, port 123
stratum 2, precision -24, leap 00, trust 000
refid [<NTP IP Address>], delay 0.02615, dispersion 0.00003
transmit 2, in filter 2
reference time:>
    e01a7b0d.af9e6616 2019 年 2 月 22 日星期五 13:43:41.686
起源时间戳:e01a7c06.748e0c65 2019 年 2 月 22 日星期五 13:47:50.455
传输时间戳:  e01a7c06.7478b000 Fri, Feb 22 2019 13:47:50.454
filter delay:  0.02635 0.02615 0.00000 0.00000
0.00000 0.00000 0.00000 0.00000
过滤器偏移量:0.000043 -0.00002 0.000000 0.000000
0.000000 0.000000 0.000000 0.000000
延迟 0.02615, 色散 0.00003
偏移 -0.000022

22 二月 13:47:50 ntpdate[112232]: 找不到适合同步的服务器

3.将 FQDN 添加到 getrackinfo -r 结果中的 NTP 部分。

命令:

# sudo setrackinfo -a NTPServer < NTP FQDN >

4.检查网络分离和静态路由,因为通过基于策略的路由从管理接口发送的 NTP 可能会导致问题。

命令:

# getrackinfo -n;getrackinfo -t

示例:

admin@node1:~>getrackinfo -n;getrackinfo -t
命名网络
==============
节点 ID 网络 IP 地址 网络掩码网关 VLAN 接口
静态路由列表
=================
节点 ID 网络网络掩码网关接口

5.确认 NTP 服务器正在其环境中侦听,并通常是阻止该端口的防火墙。 

命令:

# sudo ntpq -c as

示例:(在下面,我们看到一个 NTP 服务器无法访问,另一个可能由于 ACL 而被阻止)

admin@node1:~> sudo ntpq -c as
ind assid status conf reach auth condition last_event cnt
===========================================================
1 56633 8011 yes no none reject mobilize 1

6.检查 NTP 中是否存在任何日期偏差。 

命令:

# viprexec “date +%s” 2>&1 | grep “^15”

示例:

admin@node1:~>viprexec “date +%s” 2>&1 | grep “^15”
1554470147
1554470111
1554470096
1554470142
1554470144
1554470109
1554470124
1554470140

7.检查 ntpd 服务状态,然后重新启动该服务。(即使状态为“已启动且正在运行”,也要继续重新启动。)
提醒:Ntpd.service 是一种无影响服务。

命令:

# viprexec systemctl status ntpd.service | grep Active:

示例:

admin@node1:~> viprexec systemctl status ntpd.service | grep Active:
   活跃:自 Tue 2019-08-06 02:49:06 UTC 以来活跃(正在运行);1 天 18 小时前
活跃: 活跃 (running) 自 周二 2019-08-06 02:49:07 UTC; 1 天 18 小时前
活跃: 活跃 (running) 自 周三 2019-08-07 20:13:27 UTC; 58min ago
活跃: 活跃 (running) 自 周二 2019-08-06 02:49:06 UTC; 1 天 18 小时前
活跃: 活跃 (running) 自 周二 2019-08-06 02:49:07 UTC; 1 天 18 小时前
活跃: 活跃 (running) 自 周二 2019-08-06 02:49:07 UTC; 1 天 18 小时前
活跃: 自 Tue 2019-08-06 02:49:07 UTC 开始运行;1 天 18 小时前
Active: active (running) since Tue 2019-08-06 02:49:07 UTC; 1 天 18h 前

命令: 

# viprexec systemctl restart ntpd.service

示例:

admin@node1:~> viprexec systemctl restart ntpd.service
Output from host :192.168.219.8
Output from host :192.168.219.7
Output from host :192.168.219.6
Output from host :192.168.219.4
Output from host :192.168.219.3
Output from host :192.168.219.2
Output from host :192.168.219.5
Output from host :192.168.219.1

8.验证所有节点上的 md5sum ntp.conf 文件。

命令:

# viprexec “sudo md5sum /etc/ntp.conf”

示例:

admin@node1:~> viprexec “sudo md5sum /etc/ntp.conf”

Output from host :192.168.219.2
741f0abb12ac82a21f150004bd407334 /etc/ntp.conf

Output from host :192.168.219.5
741f0abb12ac82a21f150004bd407334 /etc/ntp.conf

Output from host :192.168.219.4
741f0abb12ac82a21f150004bd407334 /etc/ntp.conf

Output from host :192.168.219.1
7da6eb8009abc18ed1875f1f15ade72a /etc/ntp.conf

Output from host :192.168.219.3
741f0abb12ac82a21f150004bd407334 /etc/ntp.conf

Output from host :192.168.219.8
741f0abb12ac82a21f150004bd407334 /etc/ntp.conf

Output from host :192.168.219.6
741f0abb12ac82a21f150004bd407334 /etc/ntp.conf

Output from host :192.168.219.7
741f0abb12ac82a21f150004bd407334 /etc/ntp.conf

提醒:这可能是由于具有公用和管理接口,并且节点均配置为根据上次提供的配置退出公用。在较旧版本的 ECS 上,PBR 可能会卡在一个节点有效,而其余节点似乎位于防火墙后面。

9.将 123 添加到 getrackinfo -r 结果中的 ns_mgmt,然后检查 NTP 是否已开始发送和接收。

命令:

# sudo setrackinfo -a ns_mgmt 123

示例:

admin@node1:~>sudo setrackinfo -a ns_mgmt 123

如果错误仍然存在,请将端口 123 放回公共接口,然后再次检查同步。

命令:

# sudo setrackinfo -d ns_mgmt 123

示例:

admin@node1:~> sudo setrackinfo -d ns_mgmt 123

执行上述每个步骤后,检查 NTP 同步的状态。

分辨率:
这意味着配置的服务器不是 NTP 服务器,或者它未按预期运行。客户的网络团队必须参与解决 NTP 问题。

Additional Information

如果上述解决方案不起作用,则必须联系客户的网络团队来解决 NTP 问题。

有关症状“NTP 守护程序未运行”(NTPD_NOT_RUNNING),请参阅知识库文章:
ECS: xDoctor:RAP081: 症状代码:2048:NTP 守护程序未运行

有关症状“所有 NTP 服务器都调整偏移量高于错误阈值”(NTP_ERROR_OFFSET_ERROR),请参阅知识库文章:
ECS: xDoctor:RAP081: 症状代码:2048:所有 NTP 服务器都会调整高于错误阈值

的偏移量有关症状“系统时间差高于 ERROR 阈值”,请参阅知识库文章:
ECS: xDoctor:RAP081: 症状代码:2048:系统时间差高于 ERROR 阈值

Affected Products

ECS

Products

ECS Appliance, ECS Appliance Gen 1, ECS Appliance Gen 2, ECS Appliance Gen 3, ECS Software
Article Properties
Article Number: 000230633
Article Type: Solution
Last Modified: 03 Oct 2024
Version:  2
Find answers to your questions from other Dell users
Support Services
Check if your device is covered by Support Services.