Details
-
Bug
-
Status: Closed
-
Minor
-
Resolution: Fixed
-
2.0.0
-
None
-
None
-
Reviewed
Description
When DNS is unavailable, the new started regionservers will listen on localhost(127.0.0.1) in a distributed cluster, which results that the hmaster will fail to assign regions to those regionservers.
2014-10-15,04:26:42,273 WARN org.apache.hadoop.net.DNS: Unable to determine local hostname -falling back to "localhost"
java.net.UnknownHostException: xx-hadoop-srv-st01.bj: xx-hadoop-srv-st01.bj
at java.net.InetAddress.getLocalHost(InetAddress.java:1360)
at org.apache.hadoop.net.DNS.resolveLocalHostname(DNS.java:260)
at org.apache.hadoop.net.DNS.<clinit>(DNS.java:58)
at org.apache.hadoop.hbase.regionserver.HRegionServer.<init>(HRegionServer.java:472)
$ netstat -nap | grep 13748
tcp 0 0 127.0.0.1:12610 0.0.0.0:* LISTEN 13748/java
tcp 0 0 0.0.0.0:12611 0.0.0.0:* LISTEN 13748/java
In this situation, I think we shoud throw an exception and make the startup of regionservers failed.