CDH之ntp、chronyc 时间同步问题

CDH之ntp、chronyc 时间同步问题,第1张

1cdh集群版本

5123  CentOS75

2、错误提示

3、集群所有节点都同步了ntp服务器,执行ntptime均返回ok,但任然有三个节点报错。

4、经过一番搜索尝试,问题在于CDH不能及时获取服务器同步性(当我们使用NTP时间同步服务器时)。所以我阐释使用chronyd做时间同步

5、CDH界面验证OK,错误警告消除。

现是做时间同步一般是透过NTP (Neork Time Protocol)去进行。 而在Unix/Linux用 NTP同步时间最简单的做法是使用 ntpdate 向 NTP服务器要求同步时间,做法如下: ntpdate poolntp hwclock -w hwclock -w 的作用是把系统时间写入 CMOS
令硬体时间(CMOS时间)和软件时间(Unix系统时间)同步。ntpdate 指令后是NTP服务器的名字。现时登记了在中国香港的NTP服务器有: stdtime - ntpisc/bin/view/Servers/StdtimeGovHk ntpcuedu - ntpisc/bin/view/Servers/NtpCuEduHk poolntp由很多NTP服务器组成,所以很稳定。不过stdtime和ntpcuedu在中国香港,所以同步的速度会快很多。特别 stdtime,很多人都喜用这个天文台的NTP server,所以其loading有时会颇高。早几年经常会有down机的情况。不过近年稳定和scalability好了很多(upgrade了硬体!) ,我暂时未见有死机或连接不到的情况。 如果你有多部电脑,最好的方法当是架设一部NTP服务器,这她自己去和主要的NTP服务器同步时间。而你网络上的电脑就可以向他要求同步时间。这方法一方面减轻主要TP服务器的loading,也可以减少你网络上电脑的时间偏差。做法可以参考以下连结: wikilinux/w/Setup_OpenNTPD gentoo-wiki/HOWTO_NTP_Using_OpenNTPD openbsdsupport/openNTPD
参考: 自己
搞HA
Cluster之类, 起Time server 是近乎必要的
你要使用NTP服务来同步时间 The NTP FAQ and HOWTO 另外中国香港天文台有提供NTP Server " stdtime " 你可用此时间伺服器来进行同步
参考: o/nts/ntimec

1 修改注册表项
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\W32Time\TimeProviders\NtpServer
Enabled 设定为 1(默认0)
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\W32Time\Config\
AnnounceFlags 设定为 5 (默认 10)
Value
Meaning
0
Timeserv_Announce_No, Reliable_Timeserv_Announce_No The domain controller does not advertise time service
1
Timeserv_Announce_Yes The domain controller always advertises time service
2
Timeserv_Announce_Auto The domain controller automatically determines whether it should advertise time service
4
Reliable_Timeserv_Announce_Yes The domain contoller will always advertise reliable time service
8
Reliable_Timeserv_Announce_Auto The domain controller automatically determines whether it should advertise reliable time service


欢迎分享,转载请注明来源:内存溢出

原文地址: http://outofmemory.cn/zz/10683173.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2023-05-10
下一篇 2023-05-10

发表评论

登录后才能评论

评论列表(0条)

保存