Hbase错误总结:Hbase连接不上Zookeeper

错误信息:

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优化经验总结

 3、Hbase错误总结:Hbase未正常关闭启动报错

4、Hbase错误总结:Hbase连接不上Zookeeper

5、大数据入门教程系列之Hbase安装(伪分布式)

猜你喜欢

转载自blog.csdn.net/zjh_746140129/article/details/83417879