我正在使用Hbase-Hadoop组合作为我的应用程序以及Data Nucleus作为ORM。错误HBASE-ZOOKEEPER:连接太多
当我试图通过多个线程在一次访问hbase。它抛出的例外如下:
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
如果需要我可以提供完整的堆栈跟踪(由于完整的堆栈跟踪使事情混乱在这里)。
请帮助我解决一些如何处理这种情况的线索。我需要做什么来增加连接池吗?
感谢您的回复,我会尽快回复您 – devsri 2012-02-11 06:09:18
在哪里可以找到zoo.cfg?我在hbase目录中的任何地方找不到它 – sunskin 2013-10-01 19:48:54
它不在hbase目录内,它位于zookeeper conf目录中。如果您使用hbase管理zookeeper,则可以使用hbase-site.xml中的属性hbase.zookeeper.property.maxClientCnxns,但我不建议将它用于生产环境,因为它不适用于分布式模式。 – 2013-10-02 21:15:51