Error HBASE-ZOOKEEPER : Too many connections

后端 未结 3 390
情深已故
情深已故 2021-01-19 02:46

I am using Hbase-Hadoop combination for my application along with Data Nucleus as the ORM.

When I am trying to access hbase via several threads at a single time. It

相关标签:
3条回答
  • 2021-01-19 03:19

    Zookeeper servers have an active connections limit, which by default is 30. You need to increase this limit by setting maxClientCnxns property accordingly in your zookeeper config file, zoo.cfg.

    For 100 connections:

    maxClientCnxns=100
    

    To tell zookeeper to impose no limit to the number of connections:

    maxClientCnxns=0
    
    0 讨论(0)
  • 2021-01-19 03:33

    I don't suggest to blindly dump up the max connection, this config is not max connections to ZK, but max concurrent connections per client to ZK, according to the ZK document:

    maxClientCnxns (No Java system property)

    Limits the number of concurrent connections (at the socket level) that a single client, identified by IP address, may make to a single member of the ZooKeeper ensemble. This is used to prevent certain classes of DoS attacks, including file descriptor exhaustion. Setting this to 0 or omitting it entirely removes the limit on concurrent connections.

    therefore, you must have more than 30 concurrent connections to ZK from the same IP address. in this case, use netstat to debug what that IP is, and inspect what could init those many connections at the same time.

    0 讨论(0)
  • For the above issue you need to restart the master service of HBase. The command for the same is

    sudo /etc/init.d/hadoop-hbase-master start
    

    this needs to be done before entering to HBase shell.

    0 讨论(0)
提交回复
热议问题