hadoop-common-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Wangwenli <wangwe...@huawei.com>
Subject regarding _HOST token replacement in security hadoop
Date Thu, 26 Jul 2012 03:59:01 GMT
Hi all,

   I configured like below in hdfs-site.xml:



   When  start up namenode, I found, namenode will use principal : nn/167-52-0-56@site to
login, but the http server will use nn/167-52-0-56.site@site<mailto:nn/167-52-0-56.site@site>
to lgin,  so it start failed.

I checked the code,

Namenode will use socAddr.getHostName() to get hostname in org.apache.hadoop.hdfs.server.namenode.NameNode<eclipse-javadoc:%E2%98%82=hadoop-2.0.0-alpha-src/hadoop-hdfs-project%5C/hadoop-hdfs%5C/src%5C/main%5C/java%3Corg.apache.hadoop.hdfs.server.namenode%7BNameNode.java%E2%98%83NameNode>.loginAsNameNodeUser.

But httpserver 's hostname is, so in org.apache.hadoop.security.SecurityUtil<eclipse-javadoc:%E2%98%82=hadoop-2.0.0-alpha-src/hadoop-common-project%5C/hadoop-common%5C/src%5C/main%5C/java%3Corg.apache.hadoop.security%7BSecurityUtil.java%E2%98%83SecurityUtil>.replacePattern,
it will get the hostname by invoking getLocalHostName,there it use getCanonicalHostName(),

I think this inconsistent is wrong,  can someone confirm this? Need raise one bug ?

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message