hbase-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Fredrik Möllerstrand <fred...@mollerstrand.se>
Subject Re: HMaster and /etc/hosts
Date Mon, 15 Jun 2009 17:52:06 GMT
On Mon, Jun 15, 2009 at 6:18 PM, Lars George<lars@worldlingo.com> wrote:
> Hi Fredrik,
> Stack suggested it could be that your servers have in the nsswitch.conf to
> use files before dns? Could you try for us and switch that, revert the entry
> in the /etc/hosts and then try if the options J-D suggest to see if they
> work for this problem?
> Then we can document this properly in the overview.html or up on the wiki.
> Thanks,
> Lars

I tried to verify our assumptions but ran into fresh trouble:

After setting hbase.master.dns.interface and
hbase.master.dns.nameserver to appropriate values, I switched
/etc/hosts back as it were (with master2 pointing to and
switched the order of 'files' and 'dns' in /etc/nsswitch.conf to read
like so:

hosts: dns files

The expected outcome of this is to force a successful DNS resolution.
Instead the master fails to start as per the exception dump below.

I suppose this is because the name server does not have an answer to
the query for "master2" - not so strange after all. But surely the
lookup mechanism should fall back on /etc/hosts? Weirdness.

2009-06-15 17:42:02,080 ERROR org.apache.hadoop.hbase.master.HMaster:
Can not start master
        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.master.HMaster.doMain(HMaster.java:1113)
        at org.apache.hadoop.hbase.master.HMaster.main(HMaster.java:1154)
Caused by: java.net.UnknownHostException: master2: master2
        at java.net.InetAddress.getLocalHost(InetAddress.java:1353)
        at org.apache.hadoop.net.DNS.getDefaultHost(DNS.java:185)
        at org.apache.hadoop.hbase.master.HMaster.<init>(HMaster.java:166)
        ... 6 more


View raw message