当前位置:   article > 正文

HMaster因zookeeper连接超时自杀_clientcnxn :eventthread shut down

clientcnxn :eventthread shut down

缘由

      hbase在上线一段时间后,发现HMaster经常会自杀挂掉,具体报错如下

报错

  1. 2019-06-14 11:24:07,242 WARN [master/ms-fibo-test-dataserver4/172.16.201.239:16000-EventThread] client.ConnectionManager$HConnectionImplementation: This client just lost it's session with ZooKeeper, closing it. It will be recreated next time someone needs it
  2. org.apache.zookeeper.KeeperException$SessionExpiredException: KeeperErrorCode = Session expired
  3. at org.apache.hadoop.hbase.zookeeper.ZooKeeperWatcher.connectionEvent(ZooKeeperWatcher.java:634)
  4. at org.apache.hadoop.hbase.zookeeper.ZooKeeperWatcher.process(ZooKeeperWatcher.java:566)
  5. at org.apache.hadoop.hbase.zookeeper.PendingWatcher.process(PendingWatcher.java:40)
  6. at org.apache.zookeeper.ClientCnxn$EventThread.processEvent(ClientCnxn.java:534)
  7. at org.apache.zookeeper.ClientCnxn$EventThread.run(ClientCnxn.java:510)
  8. 2019-06-14 11:24:07,243 INFO [master/ms-fibo-test-dataserver4/172.16.201.239:16000-EventThread] client.ConnectionManager$HConnectionImplementation: Closing zookeeper sessionid=0x26a9d2b8a210323
  9. 2019-06-14 11:24:07,243 INFO [master/ms-fibo-test-dataserver4/172.16.201.239:16000-EventThread] zookeeper.ClientCnxn: EventThread shut down
  10. 2019-06-14 11:24:07,466 INFO [main-SendThread(ms-fibo-test-dataserver5:2181)] zookeeper.ClientCnxn: Opening socket connection to server ms-fibo-test-dataserver5/172.16.201.240:2181. Will not attempt to authenticate using SASL (unknown error)
  11. 2019-06-14 11:24:07,468 INFO [main-SendThread(ms-fibo-test-dataserver5:2181)] zookeeper.ClientCnxn: Socket connection established, initiating session, client: /172.16.201.239:55808, server: ms-fibo-test-dataserver5/172.16.201.240:2181
  12. 2019-06-14 11:24:07,479 INFO [main-SendThread(ms-fibo-test-dataserver5:2181)] zookeeper.ClientCnxn: Unable to reconnect to ZooKeeper service, session 0x36a9d2b8896031f has expired, closing socket connection
  13. 2019-06-14 11:24:07,479 FATAL [main-EventThread] master.HMaster: master:16000-0x36a9d2b8896031f, quorum=ms-fibo-test-dataserver4.fibodata.com:2181,ms-fibo-test-dataserver5.fibodata.com:2181,ms-fibo-test-dataserver6.fibodata.com:2181, baseZNode=/hbase-unsecure master:16000-0x36a9d2b8896031f received expired from ZooKeeper, aborting
  14. org.apache.zookeeper.KeeperException$SessionExpiredException: KeeperErrorCode = Session expired
  15. at org.apache.hadoop.hbase.zookeeper.ZooKeeperWatcher.connectionEvent(ZooKeeperWatcher.java:634)
  16. at org.apache.hadoop.hbase.zookeeper.ZooKeeperWatcher.process(ZooKeeperWatcher.java:566)
  17. at org.apache.zookeeper.ClientCnxn$EventThread.processEvent(ClientCnxn.java:534)

解决方案

      由于网络抖动或者zookeeper full gc导致连接超时,会导致hbase连接不上zookeeper超时而挂掉。

      1.调大hbase会话超时时间:  hbase-site.xml

  1. <property>
  2.      <name>zookeeper.session.timeout</name>
  3.      <value>240000</value>
  4.      <!--默认: 180000 :zookeeper 会话超时时间,单位是毫秒 -->
  5. </property>

      2.调大zookeeper会话超时时间:zoo.cfg

  1. # 默认3000毫米OA
  2. tickTime=5000
  3. Session超时时间限制,如果客户端设置的超时时间不在这个范围,那么会被强制设置为最大或最小时间。默认的Session超时时间是在2 * tickTime ~ 20 * tickTime 这个范围 New in 3.3.0

 

 

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/凡人多烦事01/article/detail/94766
推荐阅读
相关标签
  

闽ICP备14008679号