[ 
https://issues.apache.org/jira/browse/HDFS-3932?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13458348#comment-13458348
 ] 

Todd Lipcon commented on HDFS-3932:
-----------------------------------

{code}
+  /**
+   * Determine the name.node.address.
+   *
+   * @return               the name.node.address to use
+   * @throws IOException
+   */
+  @VisibleForTesting
+  public static InetSocketAddress determineHttpAddress(Configuration conf)
+      throws IOException {
+    InetSocketAddress nnAddress = NameNode.getServiceAddress(conf, true);
+    return new InetSocketAddress(InetAddress.getLocalHost().getHostName(),
+        nnAddress.getPort());
+  }
{code}

We should only do this if the HTTP bind address is configured to a wildcard. 
Otherwise, we should use the bind address. Keep in mind that this isn't 
necessarily the same as the service address. Also, you're using the port from 
the service address, which is an IPC server, not HTTP.

                
> NameNode Web UI broken if the rpc-address is set to the wildcard   
> -------------------------------------------------------------------
>
>                 Key: HDFS-3932
>                 URL: https://issues.apache.org/jira/browse/HDFS-3932
>             Project: Hadoop HDFS
>          Issue Type: Bug
>    Affects Versions: 1.0.3, 2.0.0-alpha
>            Reporter: Eli Collins
>            Assignee: Eli Collins
>         Attachments: HDFS-3932.001.patch, HDFS-3932.002.patch
>
>
> If {{dfs.namenode.rpc-address}} is set to the wildcard some of links in the 
> dfsnodelist.jsp and browseDirectory.jsp pages are broken because the nnaddr 
> field is passed verbatim (eg nnaddr=0.0.0.0:8021).

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to