2013-04-05 53 views
3

我正在通过HBase快速入门指南(http://hbase.apache.org/book/quickstart.html),并且我遇到了很多通过第一步的问题。无法获取HBase独立模式启动

我在VirtualBox下使用Mint Linux 13作为主机。

我下载了hbase 0.94.6.1,将文件解压到我的主路径上,配置了环回地址。为了测试目的,我写了/ tmp并没有问题,所以我没有修改/conf/hbase-site.xml。

start-hbase.sh: 45: [: false: unexpected operator 
localhost: starting zookeeper, logging to /home/askldjd/hbase-0.94.6.1/bin/../logs/hbase-askldjd-zookeeper-test-hadoop.out 
starting master, logging to /home/askldjd/hbase-0.94.6.1/bin/../logs/hbase-askldjd-master-test-hadoop.out 
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. 
localhost: starting regionserver, logging to /home/askldjd/hbase-0.94.6.1/bin/../logs/hbase-askldjd-regionserver-test-hadoop.out 

如果我输入./bin/hbase shell,并输入状态,这是我得到的。

13/04/05 01:47:06 ERROR client.HConnectionManager$HConnectionImplementation: Check the value configured in 'zookeeper.znode.parent'. There could be a mismatch with the one configured in the master. 

JAVA_HOME已配置。

[email protected] ~ $ echo $JAVA_HOME 
/usr/lib/jvm/java-6-openjdk-amd64/ 

我想我在这里错过了一些非常基本的东西。任何帮助将不胜感激。

感谢

...艾伦

+0

您必须更新hbase-site .xml并在其中添加hbase.root.dir路径 – 2013-04-05 06:41:33

+0

我已按照快速入门指南完成此操作。同样的结果。 – askldjd 2013-04-05 12:29:20

回答

4

根据日志消息出现在其默认端口启动饲养员一些问题(2181)

“无法在2181请求的端口开始ZK “。

检查任何其他进程是否在端口2181上运行,如果是的话请尝试停止该端口上运行的进程后启动HBase的2181

否则

您可以单独运行饲养员告诉hbase使用它。

为了使HBase的使用你单独运行的动物园管理员,下面的变化要作出的的conf/hbase-env.sh

  • HBASE_MANAGES_ZK变量被设置为false(这告诉HBase的不开始自己的饲养员合奏)

  • 设置饲养员价值及其在CONF/HBase的-site.xml中港

    <property> 
        <name>hbase.zookeeper.quorum</name> 
        <value>localhost</value> 
    </property> 
    
    <property> 
        <name>hbase.zookeeper.property.clientPort</name> 
        <value>2181</value> 
    </property> 
    

请参考以下链接配置和运行饲养员:

http://zookeeper.apache.org/doc/r3.3.3/zookeeperStarted.html#sc_InstallingSingleMode