您的位置:首页 > 其它

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

2018-11-04 11:55 183 查看
版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/zjh_746140129/article/details/83417879

错误信息:

[code]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 

[code]export HBASE_MANAGES_ZK=false

以下也可以导致这个问题:

1、netstat -antp | fgrep 2181,就知道端口被什么进程占了

2、已经启动ZK,但是HBase并没有使用外部的ZK,导致冲突

2).hbase-site.xml 将 hbase.cluster.distributed 设置为true

[code]<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安装(伪分布式)

内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: