Reputation: 11137
I am trying to follow along the hbase quickstart, but I'm running into an error I can't seem to resolve. I'm using the hbase-0.98.7-hadoop2 distribution. When I start hbase with bin/start-hbase.sh
, I see in the logs:
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 ERROR [RS_OPEN_REGION-vagrant-ubuntu-precise-64:22299-0] handler.OpenRegionHandler: Failed open of region=hbase:namespace,,1415321583827.49f3bd83d8a3431fe3cd69e565920703., starting to roll back the global memstore size. java.lang.IllegalStateException: Could not instantiate a region instance. at org.apache.hadoop.hbase.regionserver.HRegion.newHRegion(HRegion.java:4261) at org.apache.hadoop.hbase.regionserver.HRegion.openHRegion(HRegion.java:4569) at org.apache.hadoop.hbase.regionserver.HRegion.openHRegion(HRegion.java:4542) at org.apache.hadoop.hbase.regionserver.HRegion.openHRegion(HRegion.java:4498) at org.apache.hadoop.hbase.regionserver.HRegion.openHRegion(HRegion.java:4449) at org.apache.hadoop.hbase.regionserver.handler.OpenRegionHandler.openRegion(OpenRegionHandler.java:482) at org.apache.hadoop.hbase.regionserver.handler.OpenRegionHandler.process(OpenRegionHandler.java:145) at org.apache.hadoop.hbase.executor.EventHandler.run(EventHandler.java:128) 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) Caused by: 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) at org.apache.hadoop.hbase.regionserver.HRegion.newHRegion(HRegion.java:4258) ... 10 more Caused by: java.lang.IllegalArgumentException: Need table descriptor at org.apache.hadoop.hbase.regionserver.HRegion.(HRegion.java:555) at org.apache.hadoop.hbase.regionserver.HRegion.(HRegion.java:531) ... 15 more
Now, when I open an HBase shell to create a table as in the quickstart, I get
$ 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 reports that I have an HMaster running:
$ jps
1391 HMaster
1955 Jps
I even have this in /etc/hosts
127.0.0.1 localhost
127.0.0.1 ubuntu.ubuntu-domain ubuntu
Help? I thought the package is supposed to be self-contained. It shouldn't depend on a running version of zookeeper, right?
Any help would be appreciated. I'm on Ubuntu 64-bit using Oracle Java 1.7.0_72.
I found someone else's solution was to run HBase 0.94, but that can't be the best solution.
Thanks in advance.
Upvotes: 1
Views: 3414
Reputation: 1
You have this problem because you forget input all of your "Master name and slave name" in your "/.../hbase/conf/regionservers" example : (vim /opt/hbase/conf/regionservers)
Master <---this
slave1
slave2
slave3
.
.
.
Upvotes: 0
Reputation: 122
First start zookeeper than change hbase-env.sh
as below.
# Tell HBase whether it should manage its own instance of Zookeeper or not.
export HBASE_MANAGES_ZK=false
Upvotes: -1
Reputation: 5881
if you are working on standalone mode , then paste this script in hbase-site.xml. Make a directory HBASE and change in script according to your system.
<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>
then set java path in hbase-env.sh
export JAVA_HOME=/home/user17/jdk/
then give the hbase path in .bashrc
export HBASE_INSTALL=/home/user17/BigData/hbase-0.94.8
export PATH=$PATH:$HBASE_INSTALL/bin
then go to bin directory of hbase and run command
./start-all.sh
hbase shell
let me know if not work
Upvotes: 0