I configured it following the Quick start instructions. Basically I instructed HBase to use a directory from a filesystem, instead of a using HDFS cluster. This setup is very good for doing simple examples and getting stuff ready for the real thing.
Installation was not without problems. HBase failed because it could not bind to any network interface. The log file showed the following error:
java.lang.RuntimeException: Failed construction of RegionServer: class org.apache.hadoop.hbase.master.HMasterCommandLine$LocalHMasterCannot assign requested address
at org.apache.hadoop.hbase.util.JVMClusterUtil.createMasterThread(JVMClusterUtil.java:155)
at org.apache.hadoop.hbase.LocalHBaseCluster.addMaster(LocalHBaseCluster.java:197)
at org.apache.hadoop.hbase.LocalHBaseCluster.(LocalHBaseCluster.java:147)
at org.apache.hadoop.hbase.master.HMasterCommandLine.startMaster(HMasterCommandLine.java:137)
at org.apache.hadoop.hbase.master.HMasterCommandLine.run(HMasterCommandLine.java:102)
at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:65)
at org.apache.hadoop.hbase.util.ServerCommandLine.doMain(ServerCommandLine.java:76)
at org.apache.hadoop.hbase.master.HMaster.main(HMaster.java:1074)
Caused by: java.net.BindException: Problem binding to /192.168.0.254:0 : Cannot assign requested address
at org.apache.hadoop.hbase.ipc.HBaseServer.bind(HBaseServer.java:203)
at org.apache.hadoop.hbase.ipc.HBaseServer$Listener.(HBaseServer.java:270)
at org.apache.hadoop.hbase.ipc.HBaseServer.(HBaseServer.java:1168)
at org.apache.hadoop.hbase.ipc.HBaseRPC$Server.(HBaseRPC.java:544)
at org.apache.hadoop.hbase.ipc.HBaseRPC.getServer(HBaseRPC.java:514)
at org.apache.hadoop.hbase.master.HMaster.(HMaster.java:196)
at org.apache.hadoop.hbase.master.HMasterCommandLine$LocalHMaster.(HMasterCommandLine.java:188)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
at org.apache.hadoop.hbase.util.JVMClusterUtil.createMasterThread(JVMClusterUtil.java:152)
... 7 more
Caused by: java.net.BindException: Cannot assign requested address
at sun.nio.ch.Net.bind(Native Method)
at sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:126)
at sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:59)
at org.apache.hadoop.hbase.ipc.HBaseServer.bind(HBaseServer.java:201)
... 18 more
I first believed the issue was related to IPV6, because I had related problems with java applications accessing the internet on Debian. In that case you can pass the
java.net.preferIPv6Addresses=falseparameter. You can read an explanation here.
After carefully analyzing the log file I noticed that HBase insisted on connecting to a specific IP address. And it wasn't IPv6, it was IPv4 and it had a 0 port ( see the above lising for /192.168.0.254:0).
The documentation states that HBase does a reverse DNS lookup to find it's IP address.
I checked /etc/hosts file and found the culprit. I had a line that linked my machine hostname with the above mentioned IP address.
Changed the address to loopback (127.0.0.1) and that was it: I got HBase to work.
I think the line was added there during the system installation, which is kind of strange because it shouldn't have been there. My Debian installation was clean. I installed Squeeze and then switched to testing.
I want to install Hbase on my Debian, thanks already to guide how to install.
RăspundețiȘtergereThis fixed my problem. Thank you.
RăspundețiȘtergere