Reply
New Contributor
Posts: 4
Registered: ‎06-06-2016
Accepted Solution

Oozie shell action not executing

[ Edited ]

I have created an Oozie workflow which runs the shell action and process the data.

 

Below is the workflow XML for the shell action,

<workflow-app name="My_Workflow" xmlns="uri:oozie:workflow:0.5">
<start to="shell-a221"/>
<kill name="Kill">
<message>Action failed, error message[${wf:errorMessage(wf:lastErrorNode())}]</message>
</kill>
<action name="shell-a221">
<shell xmlns="uri:oozie:shell-action:0.1">
<job-tracker>${jobTracker}</job-tracker>
<name-node>${nameNode}</name-node>
<exec>hdfs://${namenode}/tmp/data/file/shellScript.sh</exec>
<argument>${agr0}</argument>
<argument>${agr1}</argument>
<argument>${agr2}</argument>
<capture-output/>
</shell>
<ok to="End"/>
<error to="Kill"/>
</action>
<end name="End"/>
</workflow-app>

 

Using the above workflow XML i am getting the below error message, 

Cannot run program "shellScript.sh" (in directory "/mnt/yarn/nm/usercache/admin/appcache/application_1464237984019_797762/container_e140_1464237984019_797762_01_000002"): error=2, No such file or directory

 

Could any one please help me out in resolving this issue  ?

 

 

Highlighted
New Contributor
Posts: 4
Registered: ‎06-06-2016

Re: Oozie shell action not executing

By following the below steps i have resolved the issue

 

1. Just give the name of the file in 'Shell Command' field

2. After clicking enter, you see 'Files' button. Select the HDFS path to the script in that field and submit the action.

By this way, it will add an element as below, in the workflow xml.

<file>hdfs://${namenode}/tmp/data/file/shellScript.sh</file>

Posts: 416
Topics: 51
Kudos: 86
Solutions: 49
Registered: ‎06-26-2013

Re: Oozie shell action not executing

Thank you for letting us know the solution!
New Contributor
Posts: 1
Registered: ‎08-16-2017

Re: Oozie shell action not executing

Hi,

 

I'm still getting these errors even though I'm mentioning it as you suggested.

 

<exec>${automationAppRoot}/scripts/common/get_current_time_in_seconds.sh</exec>
            <file>${automationAppRoot}/scripts/common/get_current_time_in_seconds.sh</file>
 
And, this issue is intermittent. Any idea?
 
Regards,
Subu.
Announcements