原因:客戶端程序通過zookeeper訪問hbase的連接數超過設置的默認鏈接數(默認數是30),連接數不夠用會導致后續的連接連接不上去。
解決辦法:設置hbase-site.xml配置文件,添加如下屬性
<property>
<name>hbase.zookeeper.property.maxClientCnxns</name>
<value>300</value>
<description>Property from ZooKeeper's config zoo.cfg.
Limit on 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. Set high to avoid zk connection issues running
standalone and pseudo-distributed.
</description>
</property>
將最大連接數我這設置成了300,后來發現仍然提示同樣的問題,最大連接數並沒有起作用,根據屬性提示,直接修改zoo.cfg配置文件
添加:maxClientCnxns=300
重啟下zookeeper,hbase,重新測試,問題解決。
文章轉自:http://blog.csdn.net/chlaws/article/details/7101020
