[ 
https://issues.apache.org/jira/browse/HBASE-12263?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Liu Shaohui updated HBASE-12263:
--------------------------------
    Attachment: HBASE-12263-v1.diff

Throw an exception when hostname is set to localhost in a distributed cluster.

> RegionServer listens on localhost in distributed cluster when DNS is 
> unavailable
> --------------------------------------------------------------------------------
>
>                 Key: HBASE-12263
>                 URL: https://issues.apache.org/jira/browse/HBASE-12263
>             Project: HBase
>          Issue Type: Bug
>            Reporter: Liu Shaohui
>            Priority: Minor
>         Attachments: HBASE-12263-v1.diff
>
>
> 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.
> {quote}
> 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)
> {quote}
> {quote}
> $ 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
> {quote}
> In this situation, I think we shoud throw an exception and make the startup 
> of regionservers failed.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to