HMaster和HRegionServer是Hbase的兩個子進程,但是使用jps發現沒有啓動起來,所以去我們配置的logs查看錯誤信息。提示:
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.
但是在 hbase-env.sh 文件中設置了 export HBASE_MANAGES_ZK=false ,設置不使用自帶 Zookeeper,這一步設置完按理說就可以使用獨立的 Zookeeper程序了,但是還是報錯。很明顯,這是啓動自帶Zookeeper與獨立Zookeeper衝突了。因爲把hbase.cluster.distributed 設置爲 false,也就是讓hbase以standalone模式運行時,依然會去啓動自帶的zookeeper。
所以要做如下設置,值爲true:vim conf/hbase-site.xml
<property>
<name>hbase.cluster.distributed</name>
<value>true</value>
</property>