hadoop-hdfs-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Daryn Sharp (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HDFS-4471) Namenode WebUI file browsing does not work with wildcard addresses configured
Date Thu, 07 Feb 2013 19:23:14 GMT

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

Daryn Sharp commented on HDFS-4471:

bq. but I think this breaks when the NN rpc addr is not bound to the wildcard but the http
address is (because it assumes the NN is listening on the same IP the http request was handled
on, which isn't necessarily true).

Hmm, you're right, I overlooked that this is the rpc addr and not the http addr.  I'm not
sure exactly how to handle that correctly.  {{InetAddress.getLocalHost()}} isn't deterministic
across machines since it's dependent on the ordering of the network interfaces.  I guess you'd
have to do something like assume a wildcard means use the interface used by the http client:
InetSocketAddress rpcAddr = nn.getNameNodeAddress();
String rpcHost = rpcAddr.getAddress().isAnyLocalAddress())
  ? URI.create(request.getRequestURL().toString()).getHost()
  : rpcAddr.getHost();
String addr = rpcHost + ":" + rpcAddr.getPort();

I don't think there really is a way to fix {{NetUtils.getConnectAddress}} w/o providing a
default hostname.  Luckily it looks like it's only called in {{MiniRPCBenchmark}} and {{ContainerManagerImpl}}.

> Namenode WebUI file browsing does not work with wildcard addresses configured
> -----------------------------------------------------------------------------
>                 Key: HDFS-4471
>                 URL: https://issues.apache.org/jira/browse/HDFS-4471
>             Project: Hadoop HDFS
>          Issue Type: Bug
>          Components: namenode
>    Affects Versions: 3.0.0
>            Reporter: Andrew Wang
>            Assignee: Andrew Wang
>         Attachments: hdfs-4471-1.patch, hdfs-4471-2.patch
> The namenode web UI currently passes around the NN's configured RPC address in the URL.
One of the places this is used is for file browsing; the NN redirects to a random DN, and
the DN then uses the NN address from the URL to contact the NN. However, this fails when the
NN RPC address is configured to be the wildcard (
> The fix is the same as in HDFS-3932: pass the configured address through {{NetUtils#getConnectAddress}}

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

View raw message