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=整形


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM