• 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 it's 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>
    尽量同步时间
  • 相关阅读:
    NEC的学习笔记
    MVC过滤器中获取实体类属性值
    Facebook Hack 语言 简介
    6.格式化输出(转)
    ProcessBuilder 和 Runtime(转)
    JAVA I/O使用方法(转)
    java中输出流OutputStream 类应用实例(转)
    InputStream、OutputStream、String的相互转换(转)
    海茶3 らぶデス3 入门经典教程
    天将降大任于斯人也,必先苦其心志,劳其筋骨,饿其体肤,空乏其身,行拂乱其所为,所以动心忍性,增益其所不能
  • 原文地址:https://www.cnblogs.com/yjt1993/p/11164552.html
Copyright © 2020-2023  润新知