启动HBase错误和表创建失败

时间:2014-11-08 01:56:13

标签: hbase

我正在尝试跟随hbase quickstart,但我遇到了一个我似乎无法解决的错误。我正在使用hbase-0.98.7-hadoop2发行版。当我使用bin/start-hbase.sh启动hbase时,我会在日志中看到:

2014-11-08 01:40:07,911 INFO  [main] util.VersionInfo: HBase 0.98.7-hadoop2
2014-11-08 01:40:07,911 INFO  [main] util.VersionInfo: Subversion git://acer/usr/src/hbase -r 800c23e2207aa3f9bddb7e9514d8340bcfb89277
2014-11-08 01:40:07,912 INFO  [main] util.VersionInfo: Compiled by apurtell on Wed Oct  8 15:58:11 PDT 2014
2014-11-08 01:40:08,195 INFO  [main] server.ZooKeeperServer: Server environment:zookeeper.version=3.4.6-1569965, built on 02/20/2014 09:09 GMT
2014-11-08 01:40:08,196 INFO  [main] server.ZooKeeperServer: Server environment:host.name=vagrant-ubuntu-precise-64
2014-11-08 01:40:08,196 INFO  [main] server.ZooKeeperServer: Server environment:java.version=1.7.0_72
2014-11-08 01:40:08,196 INFO  [main] server.ZooKeeperServer: Server environment:java.vendor=Oracle Corporation
2014-11-08 01:40:08,196 INFO  [main] server.ZooKeeperServer: Server environment:java.home=/usr/lib/jvm/jdk1.7.0_72/jre

[...]

  

2014-11-08 01:40:18,471错误   [RS_OPEN_REGION-流浪-Ubuntu的精确-64:22299-0]   handler.OpenRegionHandler:打开失败   区域= HBase的:命名空间,, 1415321583827.49f3bd83d8a3431fe3cd69e565920703。   开始回滚全局memstore大小。   java.lang.IllegalStateException:无法实例化区域   实例。           在org.apache.hadoop.hbase.regionserver.HRegion.newHRegion(HRegion.java:4261)           在org.apache.hadoop.hbase.regionserver.HRegion.openHRegion(HRegion.java:4569)           在org.apache.hadoop.hbase.regionserver.HRegion.openHRegion(HRegion.java:4542)           在org.apache.hadoop.hbase.regionserver.HRegion.openHRegion(HRegion.java:4498)           在org.apache.hadoop.hbase.regionserver.HRegion.openHRegion(HRegion.java:4449)           在org.apache.hadoop.hbase.regionserver.handler.OpenRegionHandler.openRegion(OpenRegionHandler.java:482)           在org.apache.hadoop.hbase.regionserver.handler.OpenRegionHandler.process(OpenRegionHandler.java:145)           在org.apache.hadoop.hbase.executor.EventHandler.run(EventHandler.java:128)           在java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)           at java.util.concurrent.ThreadPoolExecutor $ Worker.run(ThreadPoolExecutor.java:615)           at java.lang.Thread.run(Thread.java:745)引起:java.lang.reflect.InvocationTargetException           at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)           at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)           at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)           at java.lang.reflect.Constructor.newInstance(Constructor.java:526)           在org.apache.hadoop.hbase.regionserver.HRegion.newHRegion(HRegion.java:4258)           ... 10更多引起:java.lang.IllegalArgumentException:需要表描述符           在org.apache.hadoop.hbase.regionserver.HRegion。(HRegion.java:555)           在org.apache.hadoop.hbase.regionserver.HRegion。(HRegion.java:531)           ......还有15个

现在,当我打开一个HBase shell来创建快速入门中的表时,我得到了

$ bin/hbase shell
2014-11-08 01:47:18,918 INFO  [main] Configuration.deprecation: hadoop.native.lib is deprecated. Instead, use io.native.lib.available
HBase Shell; enter 'help<RETURN>' for list of supported commands.
Type "exit<RETURN>" to leave the HBase Shell
Version 0.98.7-hadoop2, r800c23e2207aa3f9bddb7e9514d8340bcfb89277, Wed Oct  8 15:58:11 PDT 2014

hbase(main):001:0> create 'test', 'cf'
2014-11-08 01:48:44,064 WARN  [main] util.NativeCodeLoader: Unable to load native-hadoop library for your platform... using builtin-java classes where applicable

ERROR: java.io.IOException: Table Namespace Manager not ready yet, try again later
    at org.apache.hadoop.hbase.master.HMaster.getNamespaceDescriptor(HMaster.java:3172)
    at org.apache.hadoop.hbase.master.HMaster.createTable(HMaster.java:1727)
    at org.apache.hadoop.hbase.master.HMaster.createTable(HMaster.java:1766)
    at org.apache.hadoop.hbase.protobuf.generated.MasterProtos$MasterService$2.callBlockingMethod(MasterProtos.java:40470)
    at org.apache.hadoop.hbase.ipc.RpcServer.call(RpcServer.java:2027)
    at org.apache.hadoop.hbase.ipc.CallRunner.run(CallRunner.java:108)
    at org.apache.hadoop.hbase.ipc.FifoRpcScheduler$1.run(FifoRpcScheduler.java:74)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
    at java.util.concurrent.FutureTask.run(FutureTask.java:262)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
    at java.lang.Thread.run(Thread.java:745)

JPS报告我正在运行HMaster:

$ jps
1391 HMaster
1955 Jps

我甚至在/etc/hosts

中有这个
127.0.0.1 localhost
127.0.0.1 ubuntu.ubuntu-domain ubuntu

帮助?我认为这个包应该是自包含的。它不应该依赖于zookeeper的运行版本,对吗?

任何帮助将不胜感激。我正在使用Oracle Java 1.7.0_72使用64位Ubuntu。

我发现其他人的解决方案是运行HBase 0.94,但这不是最佳解决方案。

提前致谢。

3 个答案:

答案 0 :(得分:0)

如果您正在使用独立模式,请将此脚本粘贴到hbase-site.xml中。创建目录HBASE并根据您的系统更改脚本。

<configuration>
    <property>
        <name>hbase.rootdir</name>
        <value>/home/user17/HBASE/hbase</value>
    </property>
    <property>
        <name>hbase.zookeeper.property.dataDir</name>
        <value>/home/user17/HBASE/zookeeper</value>
    </property>
    <property>
        <name>hbase.zookeeper.property.clientPort</name>
        <value>2181</value>
    </property>
    <property>
        <name>hbase.master</name> 
        <value>hadoop-master:60000</value>
        </property>
</configuration>

然后在hbase-env.sh中设置java路径

export JAVA_HOME=/home/user17/jdk/

然后在.bashrc中提供hbase路径

export HBASE_INSTALL=/home/user17/BigData/hbase-0.94.8
export PATH=$PATH:$HBASE_INSTALL/bin

然后转到hbase的bin目录并运行命令

./start-all.sh

 hbase shell

让我知道如果不工作

答案 1 :(得分:0)

您遇到此问题是因为您忘记输入所有&#34;主名称和从属名称&#34;在你的&#34; /.../ hbase / conf / regionservers&#34;示例:(vim / opt / hbase / conf / regionservers) Master <---this slave1 slave2 slave3 . . .

答案 2 :(得分:-1)

首先启动zookeeper而不是更改hbase-env.sh,如下所示。

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