Support Questions

Find answers, ask questions, and share your expertise

Oozie shell action not executing

avatar
Explorer

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  ?

 

 

1 ACCEPTED SOLUTION

avatar
Explorer

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>

View solution in original post

3 REPLIES 3

avatar
Explorer

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>

avatar
Guru
Thank you for letting us know the solution!

avatar
New Contributor

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.