Posts: 50
Registered: ‎08-05-2015

Oozie Java API - Kerberos Auth

I am attempting to use the Oozie Java API's AuthOozieClient class to run a workflow.  The cluster I'm using is Kerberos-enabled and I must authenticate before getting a valid connection.  I can't seem to figure out how to authenticate with Kerberos and I get the following error:

IO_ERROR : Error while connecting Oozie server. No of retries = 1. Exception = Could not authenticate, GSSException: No valid credentials provided (Mechanism level: Failed to find any Kerberos tgt)


I know I have connectivity to the cluster, and I do have an active keytab on the cluster.


Here is a code snippet of what I have:

private static String oozieUrlString = "https://OMITTED:11443/oozie/v1/jobs?action=start";	
private static String appPath = "hdfs://OMITTED/";
    public static void main( String[] args ) throws LoginException
    	AuthOozieClient wc = new AuthOozieClient(oozieUrlString,;
    	//AuthOozieClient wc = new AuthOozieClient(oozieUrl);

        Properties conf = wc.createConfiguration();
        //conf.setProperty code OMITTED
        try {
            String jobId =;
        } catch (Exception r) {




Any help is appreciated

Posts: 177
Topics: 8
Kudos: 28
Solutions: 19
Registered: ‎07-16-2015

Re: Oozie Java API - Kerberos Auth



I don't have the exact answer for you. But in your shoe, I would begin by providing a valid jaas configuration to the JVM connecting to Oozie using the java API.


The jaas configuration should either make use of the keytab available (or a ticket cache).