Return-Path: X-Original-To: apmail-hbase-issues-archive@www.apache.org Delivered-To: apmail-hbase-issues-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id CD04310992 for ; Tue, 2 Jul 2013 05:49:22 +0000 (UTC) Received: (qmail 23050 invoked by uid 500); 2 Jul 2013 05:49:22 -0000 Delivered-To: apmail-hbase-issues-archive@hbase.apache.org Received: (qmail 22572 invoked by uid 500); 2 Jul 2013 05:49:21 -0000 Mailing-List: contact issues-help@hbase.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Delivered-To: mailing list issues@hbase.apache.org Received: (qmail 22409 invoked by uid 99); 2 Jul 2013 05:49:20 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 02 Jul 2013 05:49:20 +0000 Date: Tue, 2 Jul 2013 05:49:20 +0000 (UTC) From: "stack (JIRA)" To: issues@hbase.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (HBASE-8842) TestTokenAuthentication failing on hadoop2 build with "IllegalArgumentException: Can't get Kerberos realm" 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/HBASE-8842?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13697531#comment-13697531 ] stack commented on HBASE-8842: ------------------------------ This test looks to be failing since we upgraded to 2.0.5 according to https://builds.apache.org/job/hbase-0.95-on-hadoop2/155/testReport/org.apache.hadoop.hbase.security.token/TestTokenAuthentication/testTokenAuthentication/ which says its failed all 11 builds since 2.0.5 patch went in. at org.apache.hadoop.security.HadoopKerberosName.setConfiguration(HadoopKerberosName.java:65) ... is this: {code} 3 switch (SecurityUtil.getAuthenticationMethod(conf)) { 2 case KERBEROS: 1 case KERBEROS_SSL: 0 try { 1 KerberosUtil.getDefaultRealm(); 2 } catch (Exception ke) { 3 throw new IllegalArgumentException("Can't get Kerberos realm", ke); 4 } ... {code} Which is calling into this: {code} 17 public static String getDefaultRealm(). 16 throws ClassNotFoundException, NoSuchMethodException,. 15 IllegalArgumentException, IllegalAccessException,. 14 InvocationTargetException { 13 Object kerbConf; 12 Class classRef; 11 Method getInstanceMethod; 10 Method getDefaultRealmMethod; 9 if (System.getProperty("java.vendor").contains("IBM")) { 8 classRef = Class.forName("com.ibm.security.krb5.internal.Config"); 7 } else { 6 classRef = Class.forName("sun.security.krb5.Config"); 5 } 4 getInstanceMethod = classRef.getMethod("getInstance", new Class[0]); 3 kerbConf = getInstanceMethod.invoke(classRef, new Object[0]); 2 getDefaultRealmMethod = classRef.getDeclaredMethod("getDefaultRealm", 1 new Class[0]); 0 return (String)getDefaultRealmMethod.invoke(kerbConf, new Object[0]); 1 } {code} Looks like this the root cause: Caused by: KrbException: Could not load configuration file /etc/krb5.conf (No such file or directory) I see a krb5.conf in hadoop 2.0.5 src in test resources dir but do not see it in the tests jar. That doesn't seem correct. > TestTokenAuthentication failing on hadoop2 build with "IllegalArgumentException: Can't get Kerberos realm" > ---------------------------------------------------------------------------------------------------------- > > Key: HBASE-8842 > URL: https://issues.apache.org/jira/browse/HBASE-8842 > Project: HBase > Issue Type: Bug > Components: security > Reporter: stack > Assignee: stack > Fix For: 0.95.2 > > > On apache builds I see this often: > {code} > org.apache.hadoop.hbase.security.token.TestTokenAuthentication.testTokenAuthentication > Failing for the past 10 builds (Since #580 ) > Took 2 ms. > Error Message > Can't get Kerberos realm > Stacktrace > java.lang.IllegalArgumentException: Can't get Kerberos realm > at org.apache.hadoop.security.HadoopKerberosName.setConfiguration(HadoopKerberosName.java:65) > at org.apache.hadoop.security.UserGroupInformation.initialize(UserGroupInformation.java:225) > at org.apache.hadoop.security.UserGroupInformation.setConfiguration(UserGroupInformation.java:247) > at org.apache.hadoop.hbase.security.token.TestTokenAuthentication.testTokenAuthentication(TestTokenAuthentication.java:360) > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) > at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) > at java.lang.reflect.Method.invoke(Method.java:597) > at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:47) > at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12) > at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:44) > at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17) > at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:271) > at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:70) > at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50) > at org.junit.runners.ParentRunner$3.run(ParentRunner.java:238) > at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:63) > at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236) > at org.junit.runners.ParentRunner.access$000(ParentRunner.java:53) > at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:229) > at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26) > at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27) > at org.junit.runners.ParentRunner.run(ParentRunner.java:309) > at org.junit.runners.Suite.runChild(Suite.java:127) > at org.junit.runners.Suite.runChild(Suite.java:26) > at org.junit.runners.ParentRunner$3.run(ParentRunner.java:238) > at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:439) > at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303) > at java.util.concurrent.FutureTask.run(FutureTask.java:138) > at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:895) > at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:918) > at java.lang.Thread.run(Thread.java:662) > Caused by: java.lang.reflect.InvocationTargetException > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) > at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) > at java.lang.reflect.Method.invoke(Method.java:597) > at org.apache.hadoop.security.authentication.util.KerberosUtil.getDefaultRealm(KerberosUtil.java:66) > at org.apache.hadoop.security.HadoopKerberosName.setConfiguration(HadoopKerberosName.java:63) > ... 31 more > Caused by: KrbException: Could not load configuration file /etc/krb5.conf (No such file or directory) > at sun.security.krb5.Config.(Config.java:140) > at sun.security.krb5.Config.getInstance(Config.java:82) > ... 37 more > Caused by: java.io.FileNotFoundException: /etc/krb5.conf (No such file or directory) > at java.io.FileInputStream.open(Native Method) > at java.io.FileInputStream.(FileInputStream.java:120) > at java.io.FileInputStream.(FileInputStream.java:79) > at sun.security.krb5.Config$1.run(Config.java:519) > at java.security.AccessController.doPrivileged(Native Method) > at sun.security.krb5.Config.loadConfigFile(Config.java:515) > at sun.security.krb5.Config.(Config.java:136) > ... 38 more > {code} > Should be easy enough to fix. -- 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