错误 HBASE-ZOOKEEPER:连接过多 [英] Error HBASE-ZOOKEEPER : Too many connections

查看:27
本文介绍了错误 HBASE-ZOOKEEPER:连接过多的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在我的应用程序中使用 Hbase-Hadoop 组合以及作为 ORM 的 Data Nucleus.

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

当我尝试一次通过多个线程访问 hbase 时.它抛出异常:

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

Exception in thread "Thread-26" javax.jdo.JDODataStoreException

org.apache.hadoop.hbase.ZooKeeperConnectionException: HBase is able to connect to ZooKeeper but the connection closes immediately. This could be a sign that the server has too many connections (30 is the default). Consider inspecting your ZK server logs for that error and then make sure you are reusing HBaseConfiguration as often as you can. See HTable's javadoc for more information.

Caused by: org.apache.zookeeper.KeeperException$ConnectionLossException: KeeperErrorCode = ConnectionLoss for /hbase

如果需要,我可以提供完整的堆栈跟踪.(因为完整的堆栈跟踪会使这里的事情变得混乱).

If required I can provide the complete stack trace.(Since the complete stack trace makes thing messy out here).

请帮助我提供一些有关如何处理这种情况的线索.增加连接池需要什么配置吗?

Kindly help me out with some leads on how to handle this kind of situation. Is there any configuration I need to do to increase the connection pool?

推荐答案

Zookeeper 服务器有活动连接数限制,默认为 30.您需要通过在 Zookeeper 配置文件 zoo.cfg 中相应地设置 maxClientCnxns 属性来增加此限制.

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.

对于 100 个连接:

For 100 connections:

maxClientCnxns=100

告诉zookeeper不限制连接数:

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

maxClientCnxns=0

这篇关于错误 HBASE-ZOOKEEPER:连接过多的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆