hbase错误记录部分总结

Posted yjt1993

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了hbase错误记录部分总结相关的知识,希望对你有一定的参考价值。

错误1:org.apache.zookeeper.KeeperException$SessionExpiredException: KeeperErrorCode = Session expired

2019-03-18 10:21:01,623 [pool-5-thread-1-EventThread] WARN  org.apache.hadoop.hbase.client.ConnectionManager$HConnectionImplementation - This client just lost its session with ZooKeeper, closing it. It will be recreated next time someone needs it
 org.apache.zookeeper.KeeperException$SessionExpiredException: KeeperErrorCode = Session expired
        at org.apache.hadoop.hbase.zookeeper.ZooKeeperWatcher.connectionEvent(ZooKeeperWatcher.java:677)
        at org.apache.hadoop.hbase.zookeeper.ZooKeeperWatcher.process(ZooKeeperWatcher.java:609)
        at org.apache.hadoop.hbase.zookeeper.PendingWatcher.process(PendingWatcher.java:40)
        at org.apache.zookeeper.ClientCnxn$EventThread.processEvent(ClientCnxn.java:522)
        at org.apache.zookeeper.ClientCnxn$EventThread.run(ClientCnxn.java:498)
2019-03-18 10:21:18,758 [pool-5-thread-1-EventThread] INFO  org.apache.hadoop.hbase.client.ConnectionManager$HConnectionImplementation - Closing zookeeper sessionid=0x1697f22c8e70014
 2019-03-18 10:21:18,816 [pool-5-thread-1-EventThread] INFO  org.apache.zookeeper.ClientCnxn - EventThread shut down
 
 分析:往hbase插入大量数据的时候,client连接超时。
 可能原因:
 (1)、hbase内存堆大小设置太小,修改hbase-env.sh文件,把堆大小设置大一些。eg:export HBASE_HEAPSIZE=30720
 (2)、hadoop内存堆设置太小,修改hadoop-env.sh,把堆大小设置大一些。eg:export HBASE_HEAPSIZE=8192。默认是1000m
 (3)、zk最大连接数过小
 默认值是300,在查询量与记录数量特大的集群中,可能会造成相互间通信连接过多从而拒绝连接服务。
<property>
<name>hbase.zookeeper.property.maxClientCnxns</name>
<value>15000</value>
</property>

 

错误2:Reported time is too far out of sync with master

INFO  [regionserver60020] regionserver.HRegionServer: STOPPED: Unhandled: org.apache.hadoop.hbase.ClockOutOfSyncException: 
Server slave2,60020,1405560498057 has been rejected; Reported time is too far out of sync with master.  Time difference of 28804194ms > max allowed of 30000ms
分析:根据错误日志,可得到slave2和maste机器时间差太多,查看各个系统的时间,果真如此,同步即可。另外一种方法就是配置hbase的配置文件:
解决:
<property>
 <name>hbase.master.maxclockskew</name>
 <value>200000</value>
 <description>Time difference of regionserver from master</description>
</property>
尽量同步时间

 

以上是关于hbase错误记录部分总结的主要内容,如果未能解决你的问题,请参考以下文章

Hbase API 创建表错误记录 for Docker 容器部署集群

错误总结(仅记录遇到的错误---后续不断更新......)

Hbase记录-Hbase学习记录

自动记录/记录请求 URI 作为 PHP 错误的一部分?

记录一次 Hbase 线上问题的分析和解决,并分析总结下背后的知识点 - KeyValue size too large...

记录一次 Hbase 线上问题的分析和解决,并分析总结下背后的知识点 - KeyValue size too large...