我正在使用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