Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

Error : org.apache.hadoop.security.authentication.client.AuthenticationException: Authentication failed,

Highlighted

Error : org.apache.hadoop.security.authentication.client.AuthenticationException: Authentication failed,

New Contributor

I have a Kerberos enabled HDP 3.1 Cluster, and am trying to run some oozie jobs from our web UI. Hadoop-Auth Jar versions is hadoop-auth-3.1.1.3.1.0.0-78.jar , and Oozie-Client Jar version is oozie-client-4.3.1.3.1.0.0-78.jar.

Authentication works fine on HDP 2.6 but breaking on HDP 3.1. There has been many upgrades from HDP 2.6 (which had hadoop-auth-2.7.3.2.6.2.0-205.jar & oozie-client-4.2.0.2.6.5.0-292.jar) to HDP 3.1.

Please let me know if anyone has faced some similar issue on HDP 3.1 with Kerberos. My Oozie jobs are now breaking because of authentication now.

we are instantiating AuthOozieClient as:

AuthOozieClient oozie = new AuthOozieClient(baseUrl) {
            // default return workflow number is 50
            @Override
            public List<WorkflowJob> getJobsInfo(String filter) throws OozieClientException {
                return getJobsInfo(filter, 1, 100);
            }
        };


and trying to get the list of coordJobs like,

List<CoordinatorJob> coordList = oozie
                    .getCoordJobsInfo("status=PREP;status=RUNNING;user=" + OozieUtils.geUser(), 1, 100);


Below are the logs,

Caused by: java.io.IOException: Error while connecting Oozie server. No of retries = 1. Exception = Could not authenticate, Authentication failed, URL: http://catchy1.fyre.xxx.com:11000/oozie/v2/jobs?filter=status%3DPREP%3Bstatus%3DRUNNING%3Buser%3Dbig..., status: 401, message: Unauthorized
    at org.apache.oozie.client.retry.ConnectionRetriableClient.execute(ConnectionRetriableClient.java:67)
    at org.apache.oozie.client.OozieClient.createRetryableConnection(OozieClient.java:531)
    at org.apache.oozie.client.OozieClient$ClientCallable.call(OozieClient.java:581)
    ... 82 more
Caused by: AUTHENTICATION : Could not authenticate, Authentication failed, URL: http://catchy1.fyre.xxx.com:11000/oozie/v2/jobs?filter=status%3DPREP%3Bstatus%3DRUNNING%3Buser%3Dbig..., status: 401, message: Unauthorized
    at org.apache.oozie.client.AuthOozieClient.createConnection(AuthOozieClient.java:187)
    at org.apache.oozie.client.OozieClient$1.doExecute(OozieClient.java:528)
    at org.apache.oozie.client.retry.ConnectionRetriableClient.execute(ConnectionRetriableClient.java:44)
    ... 84 more
Caused by: org.apache.hadoop.security.authentication.client.AuthenticationException: Authentication failed, URL: http://catchy1.fyre.xxx.com:11000/oozie/v2/jobs?filter=status%3DPREP%3Bstatus%3DRUNNING%3Buser%3Dbig..., status: 401, message: Unauthorized
    at org.apache.hadoop.security.authentication.client.AuthenticatedURL.extractToken(AuthenticatedURL.java:401)
    at org.apache.hadoop.security.authentication.client.PseudoAuthenticator.authenticate(PseudoAuthenticator.java:74)
    at org.apache.hadoop.security.authentication.client.AuthenticatedURL.openConnection(AuthenticatedURL.java:348)
    at org.apache.oozie.client.AuthOozieClient.createConnection(AuthOozieClient.java:175)

authentication kerberos oozie hdp