Return-Path: X-Original-To: apmail-hadoop-hdfs-issues-archive@minotaur.apache.org Delivered-To: apmail-hadoop-hdfs-issues-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 703A6D4E8 for ; Fri, 19 Oct 2012 06:56:08 +0000 (UTC) Received: (qmail 87774 invoked by uid 500); 19 Oct 2012 06:56:07 -0000 Delivered-To: apmail-hadoop-hdfs-issues-archive@hadoop.apache.org Received: (qmail 87647 invoked by uid 500); 19 Oct 2012 06:56:05 -0000 Mailing-List: contact hdfs-issues-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: hdfs-issues@hadoop.apache.org Delivered-To: mailing list hdfs-issues@hadoop.apache.org Received: (qmail 87231 invoked by uid 99); 19 Oct 2012 06:56:03 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 19 Oct 2012 06:56:03 +0000 Date: Fri, 19 Oct 2012 06:56:03 +0000 (UTC) From: "Ahad Rana (JIRA)" To: hdfs-issues@hadoop.apache.org Message-ID: <526791781.67926.1350629763974.JavaMail.jiratomcat@arcas> In-Reply-To: <2089774134.34200.1350002703157.JavaMail.jiratomcat@arcas> Subject: [jira] [Commented] (HDFS-4043) Namenode Kerberos Login does not use proper hostname for host qualified hdfs principal name. MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/HDFS-4043?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13479668#comment-13479668 ] Ahad Rana commented on HDFS-4043: --------------------------------- Hi Brahma, Please disregard my last suggestion. Setting dfs.namenode.kerberos.principal or dfs.namenode.kerberos.internal.spnego.principal to and explicit principal name (instead of a pattern name with _HOST in it) triggers other bugs (see HDFS-4081). The bottom line is that it is probably best to set the hostname of the namenode to match exactly the name returned via a reverse-dns query (getCanonicalName). You are right however, that your problems are a manifestation of the same general bug (inconsistent resolution of canonical principal name via different code paths). Most definitely, incoming IP based connections need to use getCanonicalName to get back a host name that can be used to form the proper principal name. Otherwise you will need to probably go with IP based principal names ? As mentioned above, I have reverted to setting the internal hostname for the namenodes/secondary namenodes to exactly match the fully qualified hostname returned via reverse-dns. And so far, things seems to be working properly now. > Namenode Kerberos Login does not use proper hostname for host qualified hdfs principal name. > -------------------------------------------------------------------------------------------- > > Key: HDFS-4043 > URL: https://issues.apache.org/jira/browse/HDFS-4043 > Project: Hadoop HDFS > Issue Type: Bug > Components: security > Affects Versions: 2.0.0-alpha, 2.0.1-alpha, 2.0.2-alpha, 2.0.3-alpha > Environment: CDH4U1 on Ubuntu 12.04 > Reporter: Ahad Rana > Original Estimate: 24h > Remaining Estimate: 24h > > The Namenode uses the loginAsNameNodeUser method in NameNode.java to login using the hdfs principal. This method in turn invokes SecurityUtil.login with a hostname (last parameter) obtained via a call to InetAddress.getHostName. This call does not always return the fully qualified host name, and thus causes the namenode to login to fail due to kerberos's inability to find a matching hdfs principal in the hdfs.keytab file. Instead it should use InetAddress.getCanonicalHostName. This is consistent with what is used internally by SecurityUtil.java to login in other services, such as the DataNode. -- 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