继续上一篇博文的思路往下走
Hbase初步入门(Mac OS 10.12.5)
来完成Hbase伪分布式本地安装
1.修改hbase-site.xml配置文件
<!-- 指示HBase在分布式模式下运行 -->
<property>
<name>hbase.cluster.distributed</name>
<value>true</value>
</property>
2.启动habse
发现跟之前有点不一样
之前是如下输出:
mingleizhendeMacBook-Pro:bin mingleizhen$ ./start-hbase.sh
starting master, logging to /Users/mingleizhen/hadoop/hbase-1.3.1/bin/../logs/hbase-mingleizhen-master-mingleizhendeMacBook-Pro.local.out
现在是如下输出:
mingleizhendeMacBook-Pro:bin mingleizhen$ ./start-hbase.sh
localhost: ssh: connect to host localhost port 22: Connection refused
starting master, logging to /Users/mingleizhen/hadoop/hbase-1.3.1/bin/../logs/hbase-mingleizhen-master-mingleizhendeMacBook-Pro.local.out
starting regionserver, logging to /Users/mingleizhen/hadoop/hbase-1.3.1/bin/../logs/hbase-mingleizhen-1-regionserver-mingleizhendeMacBook-Pro.local.out
需要开启本地ssh
就直接用简单的方式吧,通过图形界面设置。
设置--->共享--->远程登录
再次执行 ./start-hbase.sh
如果告诉你已经有HMaster进程在运行中,直接kill掉,或者通过./stop-hbase.sh关闭
依旧失败
zookeeper.ClientCnxn: Opening socket connection to server localhost/0:0:0:0:0:0:0:1:2181. Will not attempt to authenticate using SASL (unknown error)
关闭防火墙也是一样的错误
3.干脆直接不用自带的zookeeper了,本地安装zookeeper,然后修改conf下的hbase-env.sh
export HBASE_MANAGES_ZK=false
注释掉hbase-site.xml中配置的如下项:
hbase.zookeeper.property.dataDir
4.启动zookeeper,再启动habse,成功!
5.jps查看
16544 QuorumPeerMain
17120 Jps
16705 HRegionServer
16627 HMaster
1597 Launcher
自带的zookeeper为什么失败,后面继续研究。