Support Questions

Find answers, ask questions, and share your expertise

RegionServers go down when change hbase.regionserver.dns.interface

avatar
Explorer

I tried setting hbase.regionserver.dns.interface --> eth1, but I'm getting this error as on the regionservers


2019-04-25 09:36:57,404 ERROR [main] regionserver.HRegionServer: Failed construction RegionServer
java.lang.RuntimeException: Failed to invoke DNS.getDefaultHost via reflection
        at org.apache.hadoop.hbase.util.DNS.getDefaultHost(DNS.java:63)
        at org.apache.hadoop.hbase.regionserver.RSRpcServices.getHostname(RSRpcServices.java:1298)
        at org.apache.hadoop.hbase.regionserver.RSRpcServices.<init>(RSRpcServices.java:1213)
        at org.apache.hadoop.hbase.regionserver.RSRpcServices.<init>(RSRpcServices.java:1184)
        at org.apache.hadoop.hbase.regionserver.HRegionServer.createRpcServices(HRegionServer.java:726)
        at org.apache.hadoop.hbase.regionserver.HRegionServer.<init>(HRegionServer.java:564)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
        at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
        at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
        at org.apache.hadoop.hbase.regionserver.HRegionServer.constructRegionServer(HRegionServer.java:2977)
        at org.apache.hadoop.hbase.regionserver.HRegionServerCommandLine.start(HRegionServerCommandLine.java:63)
        at org.apache.hadoop.hbase.regionserver.HRegionServerCommandLine.run(HRegionServerCommandLine.java:87)
        at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:76)
        at org.apache.hadoop.hbase.util.ServerCommandLine.doMain(ServerCommandLine.java:149)
        at org.apache.hadoop.hbase.regionserver.HRegionServer.main(HRegionServer.java:2995)
Caused by: java.lang.reflect.InvocationTargetException
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at org.apache.hadoop.hbase.util.DNS.getDefaultHost(DNS.java:60)
        ... 15 more
Caused by: java.lang.ArrayIndexOutOfBoundsException: 3
        at org.apache.hadoop.net.DNS.reverseDns(DNS.java:82)
        at org.apache.hadoop.net.DNS.getHosts(DNS.java:252)
        at org.apache.hadoop.net.DNS.getDefaultHost(DNS.java:365)




1 REPLY 1

avatar
Explorer

I have seen that when you are working with ipv6, you can find this error. Because they use a split of ipv4,


            String[] parts = address.getHostAddress().split("\\.");
            String reverseIP = parts[3] + "." + parts[2] + "." + parts[1] + "."
                      + parts[0] + ".in-addr.arpa";


I have found a posible solution. Put this in the hadoop-env.cmd, but i cant test yet.


-Djava.net.preferIPv4Stack=true