Updated on 2026-06-27 GMT+08:00

How Do I Resolve ZooKeeper Client TGT Refresh Failures?

Question

The ZooKeeper client fails to refresh a TGT and therefore ZooKeeper cannot be accessed. The error message is as follows:

Login: Could not renew TGT due to problem running shell command: '***/kinit -R'; exception was:org.apache.zookeeper.Shell$ExitCodeException: kinit: Ticket expired while renewing credentials

Answer

ZooKeeper historically used the system command kinit -R to renew tickets. However, this command is deprecated in the current version of MRS. For long-running tasks, you must implement authentication using a keytab file to ensure continuous access.

In the Client installation path/ZooKeeper/zookeeper/conf/jaas.conf file, set useTicketCache to false, set useKeyTab to true, and specify the keytab path.