HADOOP-15143. NPE due to Invalid KerberosTicket in UGI. Contributed by Mukul Kumar Singh.
(cherry picked from commit cb60c05c3a
)
This commit is contained in:
parent
6e11ef7c44
commit
dd1de1ea37
|
@ -1174,7 +1174,10 @@ public class UserGroupInformation {
|
|||
Object cred = iter.next();
|
||||
if (cred instanceof KerberosTicket) {
|
||||
KerberosTicket ticket = (KerberosTicket) cred;
|
||||
if (!ticket.getServer().getName().startsWith("krbtgt")) {
|
||||
if (ticket.isDestroyed() || ticket.getServer() == null) {
|
||||
LOG.warn("Ticket is already destroyed, remove it.");
|
||||
iter.remove();
|
||||
} else if (!ticket.getServer().getName().startsWith("krbtgt")) {
|
||||
LOG.warn(
|
||||
"The first kerberos ticket is not TGT"
|
||||
+ "(the server principal is {}), remove and destroy it.",
|
||||
|
|
Loading…
Reference in New Issue