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

Eli Collins updated HDFS-3434:
------------------------------

    Attachment: hdfs-3434.txt

Patch attached.  The core of the fix is here:

{code}
-      InetSocketAddress nnSocketAddress = (InetSocketAddress) context
-          .getAttribute(NameNodeHttpServer.NAMENODE_ADDRESS_ATTRIBUTE_KEY);
-      String nnaddr = nnSocketAddress.getAddress().getHostAddress() + ":"
-          + nnSocketAddress.getPort();
-
+      String nnaddr = NetUtils.getHostPortString(nn.getNameNodeAddress());
{code}

NAMENODE_ADDRESS_ATTRIBUTE_KEY contains the http bind address, it should never 
be used to create a NN rpc connection, I've removed it entirely. Eg 
DfsServlet#createNameNodeProxy is always called from w/in the NN, think this is 
dead code. Looks like this was introduced in HDFS-1709.
                
> InvalidProtocolBufferException when visiting DN browseDirectory.jsp
> -------------------------------------------------------------------
>
>                 Key: HDFS-3434
>                 URL: https://issues.apache.org/jira/browse/HDFS-3434
>             Project: Hadoop HDFS
>          Issue Type: Bug
>    Affects Versions: 2.0.0
>            Reporter: Eli Collins
>            Assignee: Eli Collins
>         Attachments: hdfs-3434.txt
>
>
> The nnaddr field on dfsnodelist.jsp is getting set incorrectly. When 
> selecting the "haus04" under the "Node" table I get a link with the http 
> address which is bogus (the wildcard/http port not the nn rpc addr), which 
> results in an error of "Call From haus04.mtv.cloudera.com/172.29.122.94 to 
> 0.0.0.0:10070 failed on connection exception: java.net.ConnectException: 
> Connection refused". The browse this file system link works.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to