HBbase的Master节点和Regionserver节点的时钟不同步,导致HBase的Regionsever不能正常启动,具体错误表现如下。
2017-10-25 17:34:04,137 FATAL [regionserver60020] regionserver.HRegionServer: ABORTING region server bionode1,60020,1508924043337: Unhandled: org.apache.hadoop.hbase.ClockOutOfSyncException: Server bionode1,60020,1508924043337 has been rejected; Reported time is too far out of sync with master. Time difference of 57422ms > max allowed of 30000ms
org.apache.hadoop.hbase.ClockOutOfSyncException: org.apache.hadoop.hbase.ClockOutOfSyncException: Server bionode1,60020,1508924043337 has been rejected; Reported time is too far out of sync with master. Time difference of 57422ms > max allowed of 30000ms
解决方法:
1)使用nptupdate同步Master节点和RegionServer节点的时钟,同步过程参考http://blog.csdn.net/scorpio3k/article/details/49645219。
2)如果感觉nptupdate太复杂,可以手工设置每个机器的时间,并写入CMOS里,具体过程如下
首先设置本地时间 命令为 date –s '2017-10-25 18:10:20'
其次,将时间写入CMOS,命令为 clock -w