> For the complete documentation index, see [llms.txt](https://docs.pentaho.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.pentaho.com/install/9.3-install/use-hadoop-with-pentaho/big-data-issues/pig-job-not-executing-after-kerberos-authentication-fails.md).

# Pig job not executing after Kerberos authentication fails

Your Pig job will not execute after the Kerberos authentication fails until you restart PDI. While PDI may continue to generate new Kerberos tickets and other Hadoop components may work, Pig continues to fail until PDI is restarted.

For authentication with Pig, Pentaho uses the `UserGroupInformation` wrapper around a JAAS Subject with username and password which is used for impersonation. The `UserGroupInformation` wrapper is stored in the `KMSClientProvider` constructor. When the Kerberos ticket expires, a new `UserGroupInformation` is created, but the instance stored in the `KMSClientProvider` constructor does not update. The Pig job fails when Pig cannot obtain delegation tokens to authenticate the job at execution time.

To resolve, set the **key.provider.cache.expiry** time to a value equal to or less than the duration time of the Kerberos ticket. By default, the **key.provider.cache.expiry** time is set to a value of: 10 days

**Note:** This solution assumes you are using HortonWorks 3.0.

1. Navigate to the `hdfs-site.xml` file location.
   * In the PDI client, navigate to: `data-integration\plugins\pentaho-big-data-plugin\hadoop-configurations\hdp25`
   * For the Pentaho Server, navigate to: `pentaho-server\pentaho-solutions\system\kettle\plugins\pentaho-big-data-plugin\hadoop-configurations\hdp25`
2. Open the `hdfs-site.xml` file in a text editor.
3. Adjust the key.provider.cache.expiry value (in milliseconds) so that it is less than the duration time of the Kerberos ticket.

   **Note:** You can view the Kerberos ticket duration time in the `krb5.conf` file.

   ```xml
   <property>
   <name>dfs.client.key.provider.cache.expiry</name>
   <value>410000</value>
   </property>
   ```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.pentaho.com/install/9.3-install/use-hadoop-with-pentaho/big-data-issues/pig-job-not-executing-after-kerberos-authentication-fails.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
