hbase connection refused hbase connection refused hadoop hadoop

hbase connection refused


The accepted answer here might work, but only as a side effect.

The problem is that HBase is opening a port listening on localhost (i.e., on loopback) rather than on the external facing interface. Removing the localhost entry in /etc/hosts forces HBase to bind to the external interface -- but only because it can't find localhost. This is likely to become a problem when some daemon wants to legitimately listen on or connect to localhost (via lo) alone.

You can test that you have this problem by using telnet to connect to port 60000 via localhost or the IP assigned to the machine. It's likely you'll be able to connect via localhost (because that's where HBase is bound) and not to the IP.

Better to use your machine name in your HBase conf.


I have found the solution.

By just removing localhost entry from my /etc/hosts. Now my localhost entry is like 192.169.19.50 [which is my hbase IP] = localhost instead of 127.0.0.1 localhost.


Assuming that you have instantiated Configuration for your HBase, set hbase master, the zookeeper quorum and the znode parent. Kinda like this-

import org.apache.hadoop.hbase.HBaseConfiguration;public class CLASS_NAME{    Configuration configuration = new HBaseConfiguration.Create();    configuration.set(hbase master, "");    configuration.set(zookeeper quorum, "");    configuration.set(znode parent, "");  }