Serhiy Boychenko created HADOOP-13322: -----------------------------------------
Summary: Comment in Kerberos file is not properly parsed Key: HADOOP-13322 URL: https://issues.apache.org/jira/browse/HADOOP-13322 Project: Hadoop Common Issue Type: Bug Affects Versions: 2.6.0 Reporter: Serhiy Boychenko Priority: Minor Hello, I am receiving an error when trying to authenticate with Kerberos: Exception in thread "main" 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:263) at org.apache.hadoop.security.UserGroupInformation.setConfiguration(UserGroupInformation.java:299) at com.example.HadoopWorkloadParquetMain.main(HadoopWorkloadParquetMain.java:147) Caused by: java.lang.reflect.InvocationTargetException at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:483) at org.apache.hadoop.security.authentication.util.KerberosUtil.getDefaultRealm(KerberosUtil.java:81) at org.apache.hadoop.security.HadoopKerberosName.setConfiguration(HadoopKerberosName.java:63) ... 3 more Caused by: KrbException: Illegal config content:; comment at sun.security.krb5.Config.parseStanzaTable(Config.java:609) at sun.security.krb5.Config.<init>(Config.java:177) at sun.security.krb5.Config.getInstance(Config.java:98) ... 9 more The krb5.conf file, somewhere in the middle has a comment starting with semicolumn (;) and it crashes the code. I have tried with the hash and it seems to be working properly. The krb5.conf file has semicolumn-started comments in the beginning and those are getting parsed correctly, what is breaking the code in the semicolumn in the middle of the configuration. The file looks like: ; Some comment. [libdefaults] default_realm = EXAMPLE.COM ... ; comment [realms] EXAMPLE.ORG = { ... } I have been looking into the Web to understand if both characters can be used as comments and it seems they can according to the following resource: https://groups.google.com/forum/#!topic/comp.protocols.kerberos/i_Cl2d7TLGU Thank you, Serhiy. -- This message was sent by Atlassian JIRA (v6.3.4#6332) --------------------------------------------------------------------- To unsubscribe, e-mail: common-dev-unsubscr...@hadoop.apache.org For additional commands, e-mail: common-dev-h...@hadoop.apache.org