diff --git a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/net/NetUtils.java b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/net/NetUtils.java index ac48a08da7..d61ac9b502 100644 --- a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/net/NetUtils.java +++ b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/net/NetUtils.java @@ -355,9 +355,8 @@ public static InetSocketAddress getConnectAddress(Server server) { } /** - * Returns the InetSocketAddress that a client can use to connect to the - * given listening address. This returns "hostname:port" of the server, - * or "127.0.0.1:port" when given a wildcard address of "0.0.0.0:port". + * Returns an InetSocketAddress that a client can use to connect to the + * given listening address. * * @param addr of a listener * @return socket address that a client can use to connect to the server. diff --git a/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt b/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt index c063268154..c983dca445 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt +++ b/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt @@ -251,6 +251,9 @@ Release 2.0.3-alpha - Unreleased HDFS-3949. NameNodeRpcServer#join should join on both client and server RPC servers. (eli) + HDFS-3932. NameNode Web UI broken if the rpc-address is set to the wildcard. + (Colin Patrick McCabe via eli) + Release 2.0.2-alpha - 2012-09-07 INCOMPATIBLE CHANGES diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/NameNodeHttpServer.java b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/NameNodeHttpServer.java index a30afcec16..fe73c42e7b 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/NameNodeHttpServer.java +++ b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/NameNodeHttpServer.java @@ -140,7 +140,8 @@ private Map getAuthFilterParams(Configuration conf) .getPort()); } httpServer.setAttribute(NAMENODE_ATTRIBUTE_KEY, nn); - httpServer.setAttribute(NAMENODE_ADDRESS_ATTRIBUTE_KEY, nn.getNameNodeAddress()); + httpServer.setAttribute(NAMENODE_ADDRESS_ATTRIBUTE_KEY, + NetUtils.getConnectAddress(nn.getNameNodeAddress())); httpServer.setAttribute(FSIMAGE_ATTRIBUTE_KEY, nn.getFSImage()); httpServer.setAttribute(JspHelper.CURRENT_CONF, conf); setupServlets(httpServer, conf);