HBase出现Reported time is too far out of sync with master
一、错误日志
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
分类:
实时数仓报错日志分析
, Apache组件使用知识
标签:
Apache组件使用
, 实时数仓报错日志分析
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· 被坑几百块钱后,我竟然真的恢复了删除的微信聊天记录!
· 没有Manus邀请码?试试免邀请码的MGX或者开源的OpenManus吧
· 【自荐】一款简洁、开源的在线白板工具 Drawnix
· 园子的第一款AI主题卫衣上架——"HELLO! HOW CAN I ASSIST YOU TODAY
· 无需6万激活码!GitHub神秘组织3小时极速复刻Manus,手把手教你使用OpenManus搭建本