Support Questions
Find answers, ask questions, and share your expertise

I am getting a Launcher Error while executing shell action in oozie workflow.

Hi all,

I have created a shell action in oozie workflow. It was executing perfectly a while ago. Later day it started showing below error.

Launcher ERROR, reason: Main class [org.apache.oozie.action.hadoop.ShellMain], main() threw exception, Cannot run program "checkForFileExistance.sh" (in directory "/data1/hadoop/yarn/local/usercache/hadoop/appcache/application_1471524954637_0316/container_e27_1471524954637_0316_01_000002"): error=2, No such file or directory
Failing Oozie Launcher, Main class [org.apache.oozie.action.hadoop.ShellMain], main() threw exception, Cannot run program "checkForFileExistance.sh" (in directory "/data1/hadoop/yarn/local/usercache/hadoop/appcache/application_1471524954637_0316/container_e27_1471524954637_0316_01_000002"): error=2, No such file or directory
  java.io.IOException: Cannot run program "checkForFileExistance.sh" (in directory "/data1/hadoop/yarn/local/usercache/hadoop/appcache/application_1471524954637_0316/container_e27_1471524954637_0316_01_000002"): error=2, No such file or directory
  at java.lang.ProcessBuilder.start(ProcessBuilder.java:1048)
  at org.apache.oozie.action.hadoop.ShellMain.execute(ShellMain.java:95)
  at org.apache.oozie.action.hadoop.ShellMain.run(ShellMain.java:57)
  at org.apache.oozie.action.hadoop.LauncherMain.run(LauncherMain.java:47)
  at org.apache.oozie.action.hadoop.ShellMain.main(ShellMain.java:49)
  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
  at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
  at java.lang.reflect.Method.invoke(Method.java:497)
  at org.apache.oozie.action.hadoop.LauncherMapper.map(LauncherMapper.java:241)
  at org.apache.hadoop.mapred.MapRunner.run(MapRunner.java:54)
  at org.apache.hadoop.mapred.MapTask.runOldMapper(MapTask.java:453)
  at org.apache.hadoop.mapred.MapTask.run(MapTask.java:343)
  at org.apache.hadoop.mapred.YarnChild$2.run(YarnChild.java:168)
  at java.security.AccessController.doPrivileged(Native Method)
  at javax.security.auth.Subject.doAs(Subject.java:422)
  at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1657)
  at org.apache.hadoop.mapred.YarnChild.main(YarnChild.java:162)
  Caused by: java.io.IOException: error=2, No such file or directory
  at java.lang.UNIXProcess.forkAndExec(Native Method)
  at java.lang.UNIXProcess.<init>(UNIXProcess.java:248)
  at java.lang.ProcessImpl.start(ProcessImpl.java:134)
  at java.lang.ProcessBuilder.start(ProcessBuilder.java:1029)
  ... 17 more

Please help me with the error.

Please not that the shell script is available in lib folder under workflow directory.

1 ACCEPTED SOLUTION

Accepted Solutions

Super Guru

@Vijay Kumar J - Do you have execute permissions on your shell script? Have you mentioned shell script correctly(with file and script tags) in your oozie workflow.xml?

Please refer this tutorial for more details:

https://github.com/crazyadmins/oozie-tutorials/tree/master/workflows/shell

View solution in original post

4 REPLIES 4

Super Guru

@Vijay Kumar J - Do you have execute permissions on your shell script? Have you mentioned shell script correctly(with file and script tags) in your oozie workflow.xml?

Please refer this tutorial for more details:

https://github.com/crazyadmins/oozie-tutorials/tree/master/workflows/shell

View solution in original post

Thanks @Kuldeep Kulkarni

It was an permission issue.

Super Guru

Thanks @Vijay Kumar J

Can you please accept the answer.

well I too have exactly same error. I have checked permissions on my script and it has execute permissions. @Vijay Kumar J is it possible for you to elaborate how it was resolved ?