[
https://issues.apache.org/jira/browse/HADOOP-7982?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13188871#comment-13188871
]
Todd Lipcon commented on HADOOP-7982:
-------------------------------------
In particular, I think Hive might have a bug which sets a thread's
ContextClassLoader to null. In the JAAS LoginContext constructor, it saves off
the thread's Context ClassLoader into a member variable, and then uses that CL
when loading the HadoopLoginModule class. In the case that its a null CL, it
fails because HadoopLoginModule isn't on the bootstrap classpath.
A workaround which fixes it is to temporarily change the thread's CCL to match
the UGI class's ClassLoader, then flip it back. I don't know quite enough about
correct/conventional classloader usage to know if this is the right fix or a
hack.
> UserGroupInformation fails to login if thread's context classloader can't
> load HadoopLoginModule
> ------------------------------------------------------------------------------------------------
>
> Key: HADOOP-7982
> URL: https://issues.apache.org/jira/browse/HADOOP-7982
> Project: Hadoop Common
> Issue Type: Bug
> Components: security
> Affects Versions: 0.23.0, 1.0.0
> Reporter: Todd Lipcon
> Assignee: Todd Lipcon
>
> In a few hard-to-reproduce situations, we've seen a problem where the UGI
> login call causes a failure to login exception with the following cause:
> Caused by: javax.security.auth.login.LoginException: unable to find
> LoginModule class: org.apache.hadoop.security.UserGroupInformation
> $HadoopLoginModule
> After a bunch of debugging, I determined that this happens when the login
> occurs in a thread whose Context ClassLoader has been set to null.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira