Home | About | Sematext search-lucene.com search-hadoop.com
 Search Hadoop and all its subprojects:

Switch to Plain View
HBase >> mail # user >> HBase with multiple interfaces

Sudarshan Kadambi 2013-11-13, 18:02
Jean-Marc Spaggiari 2013-11-14, 19:45
Asaf Mesika 2013-11-15, 05:07
Jean-Marc Spaggiari 2013-11-15, 13:52
Copy link to this message
Re: HBase with multiple interfaces
That code can be traced down to:

public static String[] getHosts(String strInterface, String nameserver)
    throws UnknownHostException {
    String[] ips = getIPs(strInterface);
    Vector<String> hosts = new Vector<String>();
    for (int ctr = 0; ctr < ips.length; ctr++)
      try {
      } catch (Exception e) {

    if (hosts.size() == 0)
      return new String[] { InetAddress.getLocalHost().getCanonicalHostName() };
      return hosts.toArray(new String[] {});
nslookup on the IP returned nothing. I've confirmed that the reverse DNS records are missing from the nameserver. So it defaults to the hostname.

----- Original Message -----
To: Sudarshan Kadambi (BLOOMBERG/ 731 LEXIN), [EMAIL PROTECTED]
At: Nov 15 2013 11:07:01

Hum. I don't know why I was not able to find it before. Sorry about that.

Have you tried to directly call reverseDns from a small java class on your server to see what is returned?
2013/11/15 Sudarshan Kadambi (BLOOMBERG/ 731 LEXIN) <[EMAIL PROTECTED]>

What doesn't work is that the RegionServers bind to the IP that the hostname maps to in /etc/hosts and not to the specified interface.

I've this in hbase-site.xml:

This however has no effect. I'm on HBase 0.94.6.

I see:
  // Server to handle client requests.
    String hostname = conf.get("hbase.regionserver.ipc.address",
        conf.get("hbase.regionserver.dns.interface", "default"),
        conf.get("hbase.regionserver.dns.nameserver", "default"))));
    int port = conf.getInt(HConstants.REGIONSERVER_PORT,
    // Creation of a HSA will force a resolve.
    InetSocketAddress initialIsa = new InetSocketAddress(hostname, port);
    if (initialIsa.getAddress() == null) {
      throw new IllegalArgumentException("Failed resolve of " + initialIsa);

So this setting is in the code (that JIRA should be resolved; it's confusing). Reverse DNS lookups don't work yet on my cluster. Could this be the reason? I traced this down to a call to getHosts() which does a reverseDns lookup. And since that doesn't work it falls back to the default?

----- Original Message -----
To: Sudarshan Kadambi (BLOOMBERG/ 731 LEXIN), [EMAIL PROTECTED]
At: Nov 15 2013 00:07:50

We are using both of the following properties: hbase.regionserver.dns.interface, base.master.dns.interface. Both set to the interface name we want. We have two interfaces as you described - one for inner communication and one for external.
What exactly is not working for you?
On Wed, Nov 13, 2013 at 8:02 PM, Sudarshan Kadambi (BLOOMBERG/ 731 LEXIN) <[EMAIL PROTECTED]> wrote:

Hi Guys:

I've HBase running on a machine with multiple interfaces (for in-bound and inter-cluster traffic). I can't get HBase to listen on the interface I want it to by setting hbase.regionserver.dns.interface. Does this setting work? What is its purpose?
After reading an old thread on the user list, I wasn't sure:

That thread led me to this unresolved JIRA: https://issues.apache.org/jira/browse/HBASE-2502

Sudarshan Kadambi 2013-11-15, 16:01
Jean-Marc Spaggiari 2013-11-15, 16:06