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

Eli Collins commented on HDFS-3932:
-----------------------------------

The issue is that the NN passes the rpc listener address (which may be the 
wildcard) directly to NAMENODE_ADDRESS_ATTRIBUTE_KEY (name.node.address). This 
value is then used to populate the nnaddr parameter which is used in the web 
UIs and servlets. name.node.address is also used in some cases to get the UGI 
when nnaddr is not passed in the URL and we're not running in the NN context, 
eg DN jsp when security is enabled.

Seems like the simplest and most compatible near term fix is to have the NN 
HTTP server set name.node.address to one of the IPs serving RPCs rather than 
the wildcard. We could make a self rpc and ask for the remote address or just 
resolve the IP of the NN hostname and assume there's an RPC server listening 
there. Tokens may use a different IP, or use the hostname if hostname based 
tokens are enable, though I think these already broken when the NN RPC servers 
bind to the wildcard because we'll currently be doing UGI lookups using the 
wildcard IP.

A perhaps better but more involved approach would be to:
# Separate out the "name.node.address" usage so it's only used when necessary 
(outside NN context, in NN context we can always use the "name.node" attribute 
to get the NN object directly)
# In the cases where name.node.address is used outside the NN, think of these 
like clients and use the fs.defaultFs authority to determine the address of the 
NN. Unlike the NN (which will clobber fs.defaultFS with the wildcard) they can 
use it to determine the IP of the NN to talk to. This should work with security 
since we'll use the same IP clients would use.

                
> 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
>
> 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