Hbase錯誤總結:Hbase連線不上Zookeeper
阿新 • • 發佈:2018-11-19
錯誤資訊:
Could not start ZK at requested port of 2181. ZK was started at port: 2182. Aborting as clients (e.g. shell) will not be able to find this ZK quorum 2018-10-24 17:41:57,609 INFO [Thread-2] server.NIOServerCnxn: Closed socket connection for client /127.0.0.1:57410 (no session established for client) 2018-10-24 17:41:57,610 INFO [main] zookeeper.MiniZooKeeperCluster: Started MiniZooKeeperCluster and ran successful 'stat' on client port=2182 2018-10-24 17:41:57,611 ERROR [main] master.HMasterCommandLine: Master exiting java.io.IOException: Could not start ZK at requested port of 2181. ZK was started at port: 2182. Aborting as clients (e.g. shell) will not be able to find this ZK quorum. at org.apache.hadoop.hbase.master.HMasterCommandLine.startMaster(HMasterCommandLine.java:212) at org.apache.hadoop.hbase.master.HMasterCommandLine.run(HMasterCommandLine.java:137) at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:70) at org.apache.hadoop.hbase.util.ServerCommandLine.doMain(ServerCommandLine.java:126) at org.apache.hadoop.hbase.master.HMaster.main(HMaster.java:2522)
錯誤截圖 :
解決方法:
1).hbase-env.sh 將 export HBASE_MANAGES_ZK 屬性設定為false
export HBASE_MANAGES_ZK=false
以下也可以導致這個問題:
1、netstat -antp | fgrep 2181,就知道埠被什麼程序佔了
2、已經啟動ZK,但是HBase並沒有使用外部的ZK,導致衝突
2).hbase-site.xml 將 hbase.cluster.distributed 設定為true
<property> <name>hbase.cluster.distributed</name> <value>true</value> </property>
再次啟動沒錯了
推薦部落格:
1、Hbase架構及工作原理、資料及物理模型、Hbase優化
2、Hbase常用優化、Hbae效能優化、Hbase優化經驗總結