[ 
https://issues.apache.org/jira/browse/HADOOP-13322?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15350833#comment-15350833
 ] 

Steve Loughran commented on HADOOP-13322:
-----------------------------------------

If it's happening in the Java layer, there's not much we can do in Hadoop 
—though we can write a test, see what happens. And we can document it as a 
known issue

Which Java version are you using? can you paste in the output of {{java 
--version}}

> 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
>          Components: security
>    Affects Versions: 2.6.0
>            Reporter: Serhiy Boychenko
>            Priority: Minor
>
> Hello,
> I am receiving an error when trying to authenticate with Kerberos:
> {code}
> 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
> {code}
> 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 ( # ) in 
> the krb5.conf file, instead of semicolumn 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:
> {code}
> ; Some initial comment.
> [libdefaults]
>  default_realm = EXAMPLE.COM
>  ...
> ; comment
> [realms]
>  EXAMPLE.ORG = {
>   ...
>  }
> {code}
> 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
> EDIT: it might be Java bug actually?
> Thank you,
> Serhiy.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to