Return-Path: Delivered-To: apmail-hadoop-common-user-archive@www.apache.org Received: (qmail 85236 invoked from network); 21 Mar 2011 09:29:40 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 21 Mar 2011 09:29:40 -0000 Received: (qmail 33562 invoked by uid 500); 21 Mar 2011 09:29:37 -0000 Delivered-To: apmail-hadoop-common-user-archive@hadoop.apache.org Received: (qmail 33506 invoked by uid 500); 21 Mar 2011 09:29:37 -0000 Mailing-List: contact common-user-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: common-user@hadoop.apache.org Delivered-To: mailing list common-user@hadoop.apache.org Received: (qmail 33480 invoked by uid 500); 21 Mar 2011 09:29:37 -0000 Delivered-To: apmail-hadoop-core-user@hadoop.apache.org Received: (qmail 33468 invoked by uid 99); 21 Mar 2011 09:29:37 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 21 Mar 2011 09:29:37 +0000 X-ASF-Spam-Status: No, hits=1.0 required=5.0 tests=FORGED_YAHOO_RCVD,FREEMAIL_FROM,SPF_PASS,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of lists@nabble.com designates 216.139.236.26 as permitted sender) Received: from [216.139.236.26] (HELO sam.nabble.com) (216.139.236.26) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 21 Mar 2011 09:29:30 +0000 Received: from isper.nabble.com ([192.168.236.156]) by sam.nabble.com with esmtp (Exim 4.69) (envelope-from ) id 1Q1bQD-0008AL-L5 for core-user@hadoop.apache.org; Mon, 21 Mar 2011 02:29:09 -0700 Message-ID: <31198828.post@talk.nabble.com> Date: Mon, 21 Mar 2011 02:29:09 -0700 (PDT) From: Sari1983 To: core-user@hadoop.apache.org Subject: Java programmatic authentication of Hadoop Kerberos MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Nabble-From: sari4hp@yahoo.com X-Virus-Checked: Checked by ClamAV on apache.org Hi, Kerberos has been configured for our Hadoop file system. I wish to do the authentication through a Java program. I'm able to perform the authentication using a normal java application. But, if I've any HDFS operations in the Java program, it's succeeded in reading the Keytab file, but showing some problems... org.apache.hadoop.security.UserGroupInformation loginUserFromKeytab INFO: Login successful for user using keytab file The problems (Exceptions are) ... org.apache.hadoop.security.UserGroupInformation reloginFromKeytab INFO: Initiating logout for Mar 21, 2011 8:56:32 AM org.apache.hadoop.security.UserGroupInformation reloginFromKeytab INFO: Initiating re-login for Mar 21, 2011 8:56:34 AM org.apache.hadoop.security.UserGroupInformation hasSufficientTimeElapsed WARNING: Not attempting to re-login since the last re-login was attempted less than 600 seconds before. Mar 21, 2011 8:56:38 AM org.apache.hadoop.security.UserGroupInformation hasSufficientTimeElapsed WARNING: Not attempting to re-login since the last re-login was attempted less than 600 seconds before. ...... Mar 21, 2011 8:56:51 AM org.apache.hadoop.security.UserGroupInformation hasSufficientTimeElapsed WARNING: Not attempting to re-login since the last re-login was attempted less than 600 seconds before. Mar 21, 2011 8:57:13 AM org.apache.hadoop.ipc.Client$Connection$1 run WARNING: Couldn't setup connection for to null Exception in thread "main" java.io.IOException: Call to /10.204.97.33:8020 failed on local exception: java.io.IOException: Couldn't setup connection for to null at org.apache.hadoop.ipc.Client.wrapException(Client.java:1139) at org.apache.hadoop.ipc.Client.call(Client.java:1107) at org.apache.hadoop.ipc.RPC$Invoker.invoke(RPC.java:226) at $Proxy5.getProtocolVersion(Unknown Source) at org.apache.hadoop.ipc.RPC.getProxy(RPC.java:398) at org.apache.hadoop.ipc.RPC.getProxy(RPC.java:384) at org.apache.hadoop.hdfs.DFSClient.createRPCNamenode(DFSClient.java:111) at org.apache.hadoop.hdfs.DFSClient.(DFSClient.java:213) at org.apache.hadoop.hdfs.DFSClient.(DFSClient.java:180) at org.apache.hadoop.hdfs.DistributedFileSystem.initialize(DistributedFileSystem.java:89) at org.apache.hadoop.fs.FileSystem.createFileSystem(FileSystem.java:1514) at org.apache.hadoop.fs.FileSystem.access$200(FileSystem.java:67) at org.apache.hadoop.fs.FileSystem$Cache.getInternal(FileSystem.java:1548) at org.apache.hadoop.fs.FileSystem$Cache.get(FileSystem.java:1530) at org.apache.hadoop.fs.FileSystem.get(FileSystem.java:228) at org.apache.hadoop.fs.FileSystem.get(FileSystem.java:111) at Fil2.main(Fil2.java:27) Caused by: java.io.IOException: Couldn't setup connection for to null at org.apache.hadoop.ipc.Client$Connection$1.run(Client.java:503) at java.security.AccessController.doPrivileged(Native Method) at javax.security.auth.Subject.doAs(Subject.java:396) at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1115) at org.apache.hadoop.ipc.Client$Connection.handleSaslConnectionFailure(Client.java:456) at org.apache.hadoop.ipc.Client$Connection.setupIOstreams(Client.java:558) at org.apache.hadoop.ipc.Client$Connection.access$2300(Client.java:210) at org.apache.hadoop.ipc.Client.getConnection(Client.java:1244) at org.apache.hadoop.ipc.Client.call(Client.java:1075) ... 15 more Caused by: java.io.IOException: Failed to specify server's Kerberos principal name at org.apache.hadoop.security.SaslRpcClient.(SaslRpcClient.java:85) at org.apache.hadoop.ipc.Client$Connection.setupSaslConnection(Client.java:413) at org.apache.hadoop.ipc.Client$Connection.access$1100(Client.java:210) at org.apache.hadoop.ipc.Client$Connection$2.run(Client.java:551) at org.apache.hadoop.ipc.Client$Connection$2.run(Client.java:548) at java.security.AccessController.doPrivileged(Native Method) at javax.security.auth.Subject.doAs(Subject.java:396) at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1115) at org.apache.hadoop.ipc.Client$Connection.setupIOstreams(Client.java:547) ... 18 more Please help me in resolving this issue. It's very urgent. I'm new to Kerberos and Hadoop. I appreciate any help. Thanks & Regards, Lakshmi -- View this message in context: http://old.nabble.com/Java-programmatic-authentication-of-Hadoop-Kerberos-tp31198828p31198828.html Sent from the Hadoop core-user mailing list archive at Nabble.com.