Our Community is getting an upgrade! To get everything ready for the relaunch, we’ll be placing the site in read-only mode starting September 21st.
We really appreciate your understanding while we get things set up behind the scenes. Catch up on all the exciting details about the move here.
Need help or have questions? Drop us a line at [email protected]

Support Questions

Find answers, ask questions, and share your expertise
Announcements
Share your experience with Cloudera on G2 and get a $25 Amazon Gift card.
Hi, I'm CLEO! Something exciting is coming to the Community. Stay Tuned!

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 .