zookeeper NIOServerCnxn: Too many connections from /10.202.50.79 - max is 60 异常解决办法

原因:客户端程序通过zookeeper访问hbase的连接数超过设置的默认链接数,连接数不够用导致

解决办法:设置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

启动hadoop,最大连接参数起作用

 

zoo.cfg参考参数设置如下:

 

dataDir = 数据存放路径

dataLogDir = 日志存放路径

clientPort = 客户端连接端口

clientPortAddress

tickTime= 整形 不能为0

maxClientCnxns= 整形 最大客户端连接数

minSessionTimeout= 整形

maxSessionTimeout= 整形

initLimit = 整形

syncLimit = 整形

electionAlg = 整形

peerType = observer | participant

server. sid= host:port | host:port:port  | host:port:port:type (type值 observer | participant)

group.gid = sid:sid (一个ID, 值是多个sid, 中间以:分割, 一个sid只能属于一个gid)

weight.sid=整形

posted @ 2012-06-22 14:37  dkcndk  阅读(4636)  评论(0编辑  收藏  举报