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]

Archives of Support Questions (Read Only)

This is an archived board for historical reference. Information and links may no longer be available or relevant
Announcements
This board is archived and read-only for historical reference. To ask a new question, please post a new topic on the appropriate active board.

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 Member

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.