Reputation: 3840
I've downloaded and installed HBase 0.94.9 in an Ubuntu image. I followed Apache's Getting Started steps. It said to modify hbase-site.xml, though I found that mine had no properties defined in it. So I added two. Here is the complete file:
<?xml version="1.0"?>
<?xml-stylesheet type="text/xsl" href="configuration.xsl"?>
<configuration>
<property>
<name>hbase.rootdir</name>
<value>file:///home/dan/hbase</value>
</property>
<property>
<name>hbase.zookeeper.property.dataDir</name>
<value>/home/dan/zookeeper</value>
</property>
</configuration>
I have also made sure that /etc/hosts doesn't have the 127.0.1.1 problem:
127.0.0.1 localhost
127.0.0.1 ubuntu
# The following lines are desirable for IPv6 capable hosts
::1 ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
If I understand correctly, this setup should run HBase completely on its own, using the local file system; Hadoop is not involved. (Hadoop is isntalled on this machine but not currently running.) But whenever I start HBase, I see this in the log:
2013-07-17 07:24:51,121 ERROR org.apache.hadoop.hbase.master.HMasterCommandLine: Failed to start master
java.net.ConnectException: Call to localhost/127.0.0.1:9000 failed on connection exception: java.net.ConnectException: Connection refused
at org.apache.hadoop.ipc.Client.wrapException(Client.java:1099)
at org.apache.hadoop.ipc.Client.call(Client.java:1075)
at org.apache.hadoop.ipc.RPC$Invoker.invoke(RPC.java:225)
at sun.proxy.$Proxy11.getProtocolVersion(Unknown Source)
It's looking for port 9000, as if it thinks it should connect to HDFS. Yet there are folders and files in /home/dan/hbase. I've searched everything in the HBase folder for "9000" and the only places I see it listed are in the docs, or in the src directory, showing examples of setting up a distributed or pseudo-distributed environment. So I'm stumped why this instance is looking for port 9000.
Anyone have any idea what is causing this?
Upvotes: 3
Views: 3213
Reputation: 1434
I ran into this problem just recently. It looks like the hbase script looks for the hadoop executable in your path and uses that to locate config files magically. You could probably remove hadoop from your path before starting hbase to get things working.
I only use hadoop intermittently, so I just commented everything out of my core-site.xml and hbase started again.
Upvotes: 0
Reputation: 3840
It turns out that I had to have Hadoop running. I don't know why, since I set up HBase to use only the local file system. But I banged my head against the problem for hours until I finally decided to start Hadoop, then HBase, and HBase immediately began working. This is in spite of the fact that HDFS is on port 8020, not 9000. I'm completely confused, but at least HBase is running.
Upvotes: 2
Reputation: 18772
In hbase-site.xml
, make sure that hbase.rootdir
is not something like hdfs://...
, but instead is pointing to local file system directory, such as /home/myuserid/hbase
Also, I think hbase.cluster.distributed
should be false
Upvotes: 2