ICode9

精准搜索请尝试: 精确搜索
首页 > 其他分享> 文章详细

HBase出现Reported time is too far out of sync with master

2022-07-07 10:35:17  阅读:165  来源: 互联网

标签:centos far ntp sudo sync server Reported org ntpd


一、错误日志

Server slave1.cdh,16020,1657157836878 has been rejected; Reported time is too far out of sync with master.  Time difference of 73287ms > max allowed of 30000ms

二、原因分析

  HBase的Regoin节点与Master节点时间对应不上,超过了指定的时间范围,使用date命令查看各自的时间,可发现Regoin节点时间慢了一分钟。

三、解决

  配置时间同步即可

1、Master节点

(1)关闭ntp服务和自启动

sudo systemctl stop ntpd
sudo systemctl disable ntpd

(2)修改ntp配置文件

sudo vim /etc/ntp.conf

    修改内容如下:

      a)修改1(授权192.168.1.0-192.168.1.255网段上的所有机器可以从这台机器上查询和同步时间)

#restrict 192.168.1.0 mask 255.255.255.0 nomodify notrap
改为
restrict 192.168.1.0 mask 255.255.255.0 nomodify notrap

      b)修改2(集群在局域网中,不使用其他互联网上的时间)

复制代码
server 0.centos.pool.ntp.org iburst
server 1.centos.pool.ntp.org iburst
server 2.centos.pool.ntp.org iburst
server 3.centos.pool.ntp.org iburst
为
#server 0.centos.pool.ntp.org iburst
#server 1.centos.pool.ntp.org iburst
#server 2.centos.pool.ntp.org iburst
#server 3.centos.pool.ntp.org iburst
复制代码

      c)添加3(当该节点丢失网络连接,依然可以采用本地时间作为时间服务器为集群中的其他节点提供时间同步)

server 127.127.1.0
fudge 127.127.1.0 stratum 10

(3)修改/etc/sysconfig/ntpd 文件

sudo vim /etc/sysconfig/ntpd

增加内容如下(让硬件时间与系统时间一起同步)

SYNC_HWCLOCK=yes

(4)重新启动ntpd服务

sudo systemctl start ntpd

(5)设置ntpd服务开机启动

sudo systemctl enable ntpd

2、Regoin子节点

(1)关闭ntp服务和自启动

sudo systemctl stop ntpd
sudo systemctl disable ntpd

(2)开启定时任务,10分钟向Master节点同步一次数据

sudo crontab -e

填写如下内容:

*/10 * * * * /usr/sbin/ntpdate Regoin节点IP地址

(3)测试时间同步是否生效

  修改任意机器时间

date -s "2020-5-14 12:12:12"

  十分钟后查看机器是否与时间服务器同步

date

 

标签:centos,far,ntp,sudo,sync,server,Reported,org,ntpd
来源: https://www.cnblogs.com/qq1035807396/p/16453791.html

本站声明: 1. iCode9 技术分享网(下文简称本站)提供的所有内容,仅供技术学习、探讨和分享;
2. 关于本站的所有留言、评论、转载及引用,纯属内容发起人的个人观点,与本站观点和立场无关;
3. 关于本站的所有言论和文字,纯属内容发起人的个人观点,与本站观点和立场无关;
4. 本站文章均是网友提供,不完全保证技术分享内容的完整性、准确性、时效性、风险性和版权归属;如您发现该文章侵犯了您的权益,可联系我们第一时间进行删除;
5. 本站为非盈利性的个人网站,所有内容不会用来进行牟利,也不会利用任何形式的广告来间接获益,纯粹是为了广大技术爱好者提供技术内容和技术思想的分享性交流网站。

专注分享技术,共同学习,共同进步。侵权联系[81616952@qq.com]

Copyright (C)ICode9.com, All Rights Reserved.

ICode9版权所有