无法在请求的2181端口启动ZK,而导出HBASE_MANAGES_ZK = false

问题

第一个目标是单独运行HBase。 一旦HBase启动,导航到ip:60010 / master-status会成功。

第二个目标是运行一个独特的ZooKeeper法定人数。 ZooKeeper已经下载并启动了:

netstat -nato | grep 2181 tcp 0 0 :::2181 :::* LISTEN off (0.00/0/0) 

conf/hbase-env.sh被更改如下:

 # Tell HBase whether it should manage it's own instance of Zookeeper or not. export HBASE_MANAGES_ZK=false 

为了避免HBase一旦启动就启动ZooKeeper。

但是,一旦HBase启动,就会发生以下错误。

 Could not start ZK at requested port of 2181. ZK was started at port: 2182. Aborting as clients (eg shell) will not be able to find this ZK quorum. 

如何通过HBase禁用ZooKeeper启动并单独运行ZooKeeper?

    根据这个文档 ,/ /usr/lib/hbase/conf/hbase-site.xml文件需要configuration如下:

     <configuration> <property> <name>hbase.cluster.distributed</name> <value>true</value> </property> </configuration> 

    避免HBasepipe理自己的ZooKeeper。

    configuration完成后, zookeeper-serverhbase-master独立启动。