Support Questions

Find answers, ask questions, and share your expertise
Announcements
Celebrating as our community reaches 100,000 members! Thank you!

Run Oozie workflow using oozie rest api - authentication failed

avatar
New Contributor

I am trying to execute a workflow using rest API, but could not proceed due to authentication error:

 

Sample:

POST : https://xxxxxxxhostxxxxxxxxx:port/oozie/v2/jobs?action=start

Content-Type : application/xml

Request Payload: 

<configuration>
<property>
<name>oozie.wf.application.path</name>
<value>hdfs://XXXXXXXXXXXXXXXXXXXXXXX</value>
</property>
<property>
<name>oozie.use.system.libpath</name>
<value>True</value>
</property>
<property>
<name>user.name</name>
<value>XXXXXXXXXXXXXXXXXx</value>
</property>
<property>
<name>jobTracker</name>
<value>yarnRM</value>
</property>

<property>
<name>mapreduce.job.user.name</name>
<value>XXXXXXXXXXXXXXXX</value>
</property>
<property>
<name>nameNode</name>
<value>hdfs://XXXXXXXXXXX</value>
</property>
</configuration>

 

response:

{
"errorMessage": "Authentication required",
"httpStatusCode": 401
}

 

 Headers: {​​​​​​​​ Date: Wed, 07 Jul 2021 06:33:50 GMT Strict-Transport-Security: max-age=31536000 WWW-Authenticate: Negotiate Set-Cookie: hadoop.auth=; Path=/; Secure; HttpOnly Content-Type: application/json; charset="UTF-8" Content-Length: 63 }​​​​​​​​ {​​​​​​​​"errorMessage":"Authentication required","httpStatusCode":401}​​​​​​​​

 

 

Tried with Basic Auth, NTLM , No Auth and Digest auth.

 

1 REPLY 1

avatar
Contributor

Hi ,

Could you please check the user is having the permission to trigger Oozie in Ranger policy (OR) also please check your Oozie workflow xml file is present in HDFS path once ..

Normal Basic Auth is fine for accessing Oozie REST APIs ..I am able to perform POST and GET request of Oozie workflow successfully and monitor the status of the workflow in the same script .