Created on 03-02-2015 11:50 AM - edited 09-16-2022 02:23 AM
Hi,
I am using CDH 5.2 on RHEL 6.3.
I want to run shell script using oozie fron HUE.
i am getting an error like this:-
java.io.IOException: Cannot run program "test.sh" (in directory "/apps/yarn/nm/usercache/tsingh12/appcache/application_1425085556881_0042/container_1425085556881_0042_01_000002"): error=2, No such file or directory at java.lang.ProcessBuilder.start(ProcessBuilder.java:1047) at org.apache.oozie.action.hadoop.ShellMain.execute(ShellMain.java:93) at org.apache.oozie.action.hadoop.ShellMain.run(ShellMain.java:55) at org.apache.oozie.action.hadoop.LauncherMain.run(LauncherMain.java:39) at org.apache.oozie.action.hadoop.ShellMain.main(ShellMain.java:47) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at org.apache.oozie.action.hadoop.LauncherMapper.map(LauncherMapper.java:227) at org.apache.hadoop.mapred.MapRunner.run(MapRunner.java:54) at org.apache.hadoop.mapred.MapTask.runOldMapper(MapTask.java:450) 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:415) at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1614) at org.apache.hadoop.mapred.YarnChild.main(YarnChild.java:163) 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:186) at java.lang.ProcessImpl.start(ProcessImpl.java:130) at java.lang.ProcessBuilder.start(ProcessBuilder.java:1028) ... 17 more
Created 03-02-2015 12:47 PM
i was able to solve the problem,
instead of keeping the file in /user/<home-directory>
i put the script file in /user/<home-directory>/oozie-oozi
and it worked.
Created on 01-12-2018 02:46 AM - edited 01-12-2018 02:47 AM
Hi all,
Which lib folder of oozie workflow should we place the script in? Are there changes in Hue 4.0?
I am running it via Shell Editor in Hue 4.0 and CDH 5.13 using hive user, I tried to put the script in folders:
- /user/hive/oozie-oozi/test.sh
- /user/hue/oozie/workspaces/hue-oozie-xxxxxxxxx.52/lib
- /user/oozie/share/lib/lib_20171122100655/oozie
http://gethue.com/use-the-shell-action-in-oozie/ - this also doesn't apply, as I have Hue 4.0 and Shell Editor requires a Script Path. So as I am giving in a Shell Editor a path to the script, which file or directory is oozie workflow looking for?
I have the same error message as was posted in a first post.
Failing Oozie Launcher, Main class [org.apache.oozie.action.hadoop.ShellMain], main() threw exception, Cannot run program "test.sh" (in directory "/yarn/nm/usercache/hive/appcache/application_1515668016860_0017/container_1515668016860_0017_01_000002"): error=2, No such file or directory java.io.IOException: Cannot run program "test.sh" (in directory "/yarn/nm/usercache/hive/appcache/application_1515668016860_0017/container_1515668016860_0017_01_000002"): error=2, No such file or directory at java.lang.ProcessBuilder.start(ProcessBuilder.java:1047) at org.apache.oozie.action.hadoop.ShellMain.execute(ShellMain.java:111) at org.apache.oozie.action.hadoop.ShellMain.run(ShellMain.java:70) at org.apache.oozie.action.hadoop.LauncherMain.run(LauncherMain.java:81) at org.apache.oozie.action.hadoop.ShellMain.main(ShellMain.java:59) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at org.apache.oozie.action.hadoop.LauncherMapper.map(LauncherMapper.java:235) at org.apache.hadoop.mapred.MapRunner.run(MapRunner.java:54) at org.apache.hadoop.mapred.MapTask.runOldMapper(MapTask.java:459) at org.apache.hadoop.mapred.MapTask.run(MapTask.java:343) at org.apache.hadoop.mapred.YarnChild$2.run(YarnChild.java:164) at java.security.AccessController.doPrivileged(Native Method) at javax.security.auth.Subject.doAs(Subject.java:415) at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1917) at org.apache.hadoop.mapred.YarnChild.main(YarnChild.java:158) 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:186) at java.lang.ProcessImpl.start(ProcessImpl.java:130) at java.lang.ProcessBuilder.start(ProcessBuilder.java:1028) ... 17 more
Does anyone know why I cannot run a script?
Created 03-02-2018 02:54 PM
Is there anyone solve this issue?
Still having same issue
Created 03-29-2018 05:49 AM
Ye even I cannot run shell jobs thru HUE. CAn anyone help.?