Client cannot authenticate XXX:[TOKEN, KERBEROS]

Time:2022-11-25

Caused by: org.apache.hadoop.security.AccessControlException: Client cannot authenticate xxx:[TOKEN, KERBEROS]

The security authentication failed, and the cause analysis is as follows:
1. Check whether the Kerberos address can be connected normally

// kdc's ip
System.setProperty("java.security.krb5.kdc", "192.168.1.1");
// realm
System.setProperty("java.security.krb5.realm", "XXX");

2. The configuration file failed to be read successfully

UserGroupInformation.loginUserFromKeytab(user name, path to keytab file);
It is recommended that the file temporarily use the solution path to see if it can solve the problem