Hi
content of job.properties:
nameNode=hdfs://nn2:8020
jobTracker=nn2:8050
queueName=CLI
oozie.libpath=/user/oozie/share/lib
oozie.wf.application.path=/user/margusja
oozie.use.system.libpath=true
user.name=margusja
mapreduce.job.user.name=margusja
workflow.xml
<workflow-app name="shell-demo" xmlns="uri:oozie:workflow:0.4">
<start to="hive-shell"/>
<action name="hive-shell">
<shell xmlns="uri:oozie:shell-action:0.1">
<job-tracker>${jobTracker}</job-tracker>
<name-node>${nameNode}</name-node>
<exec>hive -e "SELECT 1;"</exec>
<capture-output/>
</shell>
<ok to="end"/>
<error to="kill"/>
</action>
<kill name="kill">
<message>Action failed, error
message[${wf:errorMessage(wf:lastErrorNode())}]</message>
</kill>
<end name="end"/>
</workflow-app>
In case
<exec>date</exec>
Workflow works.
[root@bigdata6 ~]# oozie job -oozie http://localhost:11000/oozie -config
/tmp/job.properties --run
2015-03-18 11:50:09,342 WARN AuthenticationFilter:347 -
SERVER[bigdata6] AuthenticationToken ignored: AuthenticationToken expired
2015-03-18 11:50:09,342 WARN AuthenticationFilter:347 -
SERVER[bigdata6] AuthenticationToken ignored: AuthenticationToken expired
2015-03-18 11:50:09,344 WARN AuthenticationFilter:347 -
SERVER[bigdata6] AuthenticationToken ignored: AuthenticationToken expired
2015-03-18 11:50:09,344 WARN AuthenticationFilter:347 -
SERVER[bigdata6] AuthenticationToken ignored: AuthenticationToken expired
2015-03-18 11:50:09,353 WARN AuthenticationFilter:347 -
SERVER[bigdata6] AuthenticationToken ignored: AuthenticationToken expired
2015-03-18 11:50:09,353 WARN AuthenticationFilter:347 -
SERVER[bigdata6] AuthenticationToken ignored: AuthenticationToken expired
2015-03-18 11:50:09,493 WARN AuthenticationFilter:347 -
SERVER[bigdata6] AuthenticationToken ignored: AuthenticationToken expired
2015-03-18 11:50:09,493 WARN AuthenticationFilter:347 -
SERVER[bigdata6] AuthenticationToken ignored: AuthenticationToken expired
2015-03-18 11:50:09,540 WARN ParameterVerifier:542 - SERVER[bigdata6]
USER[-] GROUP[-] TOKEN[-] APP[-] JOB[-] ACTION[-] The application does
not define formal parameters in its XML definition
2015-03-18 11:50:09,550 WARN LiteWorkflowAppService:542 -
SERVER[bigdata6] USER[-] GROUP[-] TOKEN[-] APP[-] JOB[-] ACTION[-]
libpath [/user/margusja/lib] does not exist
2015-03-18 11:50:09,572 WARN JPAService:542 - SERVER[bigdata6] USER[-]
GROUP[-] TOKEN[-] APP[-] JOB[-] ACTION[-] JPAExecutor
[WorkflowActionGetJPAExecutor] ended with an active transaction, rolling
back
2015-03-18 11:50:09,584 INFO ActionStartXCommand:539 - SERVER[bigdata6]
USER[yarn] GROUP[-] TOKEN[] APP[shell-demo]
JOB[0000009-150318112418482-oozie-oozi-W]
ACTION[0000009-150318112418482-oozie-oozi-W@:start:] Start action
[0000009-150318112418482-oozie-oozi-W@:start:] with user-retry state :
userRetryCount [0], userRetryMax [0], userRetryInterval [10]
2015-03-18 11:50:09,584 WARN ActionStartXCommand:542 - SERVER[bigdata6]
USER[yarn] GROUP[-] TOKEN[] APP[shell-demo]
JOB[0000009-150318112418482-oozie-oozi-W]
ACTION[0000009-150318112418482-oozie-oozi-W@:start:]
[***0000009-150318112418482-oozie-oozi-W@:start:***]Action status=DONE
2015-03-18 11:50:09,584 WARN ActionStartXCommand:542 - SERVER[bigdata6]
USER[yarn] GROUP[-] TOKEN[] APP[shell-demo]
JOB[0000009-150318112418482-oozie-oozi-W]
ACTION[0000009-150318112418482-oozie-oozi-W@:start:]
[***0000009-150318112418482-oozie-oozi-W@:start:***]Action updated in DB!
2015-03-18 11:50:09,595 INFO ActionEndXCommand:539 - SERVER[bigdata6]
USER[yarn] GROUP[-] TOKEN[] APP[shell-demo]
JOB[0000009-150318112418482-oozie-oozi-W]
ACTION[0000009-150318112418482-oozie-oozi-W@:start:] end executor for wf
action 0000009-150318112418482-oozie-oozi-W with wf job
0000009-150318112418482-oozie-oozi-W
2015-03-18 11:50:09,609 WARN JPAService:542 - SERVER[bigdata6] USER[-]
GROUP[-] TOKEN[-] APP[-] JOB[-] ACTION[-] JPAExecutor
[WorkflowActionGetJPAExecutor] ended with an active transaction, rolling
back
2015-03-18 11:50:09,626 INFO ActionStartXCommand:539 - SERVER[bigdata6]
USER[yarn] GROUP[-] TOKEN[] APP[shell-demo]
JOB[0000009-150318112418482-oozie-oozi-W]
ACTION[0000009-150318112418482-oozie-oozi-W@hive-shell] Start action
[0000009-150318112418482-oozie-oozi-W@hive-shell] with user-retry state
: userRetryCount [0], userRetryMax [0], userRetryInterval [10]
2015-03-18 11:50:09,702 INFO ShellActionExecutor:539 - SERVER[bigdata6]
USER[yarn] GROUP[-] TOKEN[] APP[shell-demo]
JOB[0000009-150318112418482-oozie-oozi-W]
ACTION[0000009-150318112418482-oozie-oozi-W@hive-shell] addShareLib:
using FileSystem hdfs://nn2:8020
2015-03-18 11:50:09,732 WARN ShellActionExecutor:542 - SERVER[bigdata6]
USER[yarn] GROUP[-] TOKEN[] APP[shell-demo]
JOB[0000009-150318112418482-oozie-oozi-W]
ACTION[0000009-150318112418482-oozie-oozi-W@hive-shell] credentials is
null for the action
2015-03-18 11:50:09,766 INFO ShellActionExecutor:539 - SERVER[bigdata6]
USER[yarn] GROUP[-] TOKEN[] APP[shell-demo]
JOB[0000009-150318112418482-oozie-oozi-W]
ACTION[0000009-150318112418482-oozie-oozi-W@hive-shell] addShareLib:
using FileSystem hdfs://nn2:8020
2015-03-18 11:50:09,879 WARN JobSubmitter:150 - SERVER[bigdata6] Hadoop
command-line option parsing not performed. Implement the Tool interface
and execute your application with ToolRunner to remedy this.
2015-03-18 11:50:09,885 WARN JobSubmitter:259 - SERVER[bigdata6] No job
jar file set. User classes may not be found. See Job or Job#setJar(String).
2015-03-18 11:50:09,988 WARN YARNRunner:629 - SERVER[bigdata6] Usage of
-Djava.library.path in mapreduce.admin.map.child.java.opts can cause
programs to no longer function if hadoop native libraries are used.
These values should be set as part of the LD_LIBRARY_PATH in the map JVM
env using mapreduce.admin.user.env config settings.
2015-03-18 11:50:09,988 WARN YARNRunner:629 - SERVER[bigdata6] Usage of
-Djava.library.path in mapreduce.admin.reduce.child.java.opts can cause
programs to no longer function if hadoop native libraries are used.
These values should be set as part of the LD_LIBRARY_PATH in the reduce
JVM env using mapreduce.admin.user.env config settings.
2015-03-18 11:50:10,059 INFO ShellActionExecutor:539 - SERVER[bigdata6]
USER[yarn] GROUP[-] TOKEN[] APP[shell-demo]
JOB[0000009-150318112418482-oozie-oozi-W]
ACTION[0000009-150318112418482-oozie-oozi-W@hive-shell] Trying to get
job [job_1426130012034_0415], attempt [1]
2015-03-18 11:50:10,071 INFO ShellActionExecutor:539 - SERVER[bigdata6]
USER[yarn] GROUP[-] TOKEN[] APP[shell-demo]
JOB[0000009-150318112418482-oozie-oozi-W]
ACTION[0000009-150318112418482-oozie-oozi-W@hive-shell] checking action,
external ID [job_1426130012034_0415] status [RUNNING]
2015-03-18 11:50:10,072 WARN ActionStartXCommand:542 - SERVER[bigdata6]
USER[yarn] GROUP[-] TOKEN[] APP[shell-demo]
JOB[0000009-150318112418482-oozie-oozi-W]
ACTION[0000009-150318112418482-oozie-oozi-W@hive-shell]
[***0000009-150318112418482-oozie-oozi-W@hive-shell***]Action status=RUNNING
2015-03-18 11:50:10,072 WARN ActionStartXCommand:542 - SERVER[bigdata6]
USER[yarn] GROUP[-] TOKEN[] APP[shell-demo]
JOB[0000009-150318112418482-oozie-oozi-W]
ACTION[0000009-150318112418482-oozie-oozi-W@hive-shell]
[***0000009-150318112418482-oozie-oozi-W@hive-shell***]Action updated in DB!
2015-03-18 11:50:18,566 INFO CallbackServlet:539 - SERVER[bigdata6]
USER[-] GROUP[-] TOKEN[-] APP[-]
JOB[0000009-150318112418482-oozie-oozi-W]
ACTION[0000009-150318112418482-oozie-oozi-W@hive-shell] callback for
action [0000009-150318112418482-oozie-oozi-W@hive-shell]
2015-03-18 11:50:18,604 INFO ShellActionExecutor:539 - SERVER[bigdata6]
USER[yarn] GROUP[-] TOKEN[] APP[shell-demo]
JOB[0000009-150318112418482-oozie-oozi-W]
ACTION[0000009-150318112418482-oozie-oozi-W@hive-shell] Trying to get
job [job_1426130012034_0415], attempt [1]
2015-03-18 11:50:18,674 INFO ShellActionExecutor:539 - SERVER[bigdata6]
USER[yarn] GROUP[-] TOKEN[] APP[shell-demo]
JOB[0000009-150318112418482-oozie-oozi-W]
ACTION[0000009-150318112418482-oozie-oozi-W@hive-shell] action
completed, external ID [null]
2015-03-18 11:50:18,684 WARN ShellActionExecutor:542 - SERVER[bigdata6]
USER[yarn] GROUP[-] TOKEN[] APP[shell-demo]
JOB[0000009-150318112418482-oozie-oozi-W]
ACTION[0000009-150318112418482-oozie-oozi-W@hive-shell] Launcher ERROR,
reason: Main class [org.apache.oozie.action.hadoop.ShellMain], main()
threw exception, Cannot run program "hive -e "SELECT 1;"" (in directory
"/tmp/usercache/yarn/appcache/application_1426130012034_0415/container_1426130012034_0415_01_000002"):
error=13, Permission denied
2015-03-18 11:50:18,684 WARN ShellActionExecutor:542 - SERVER[bigdata6]
USER[yarn] GROUP[-] TOKEN[] APP[shell-demo]
JOB[0000009-150318112418482-oozie-oozi-W]
ACTION[0000009-150318112418482-oozie-oozi-W@hive-shell] Launcher
exception: Cannot run program "hive -e "SELECT 1;"" (in directory
"/tmp/usercache/yarn/appcache/application_1426130012034_0415/container_1426130012034_0415_01_000002"):
error=13, Permission denied
*java.io.IOException: Cannot run program "hive -e "SELECT 1;"" (in
directory
"/tmp/usercache/yarn/appcache/application_1426130012034_0415/container_1426130012034_0415_01_000002"):
error=13, Permission denied*
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:38)
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:225)
at org.apache.hadoop.mapred.MapRunner.run(MapRunner.java:54)
at org.apache.hadoop.mapred.MapTask.runOldMapper(MapTask.java:430)
at org.apache.hadoop.mapred.MapTask.run(MapTask.java:342)
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:1594)
at org.apache.hadoop.mapred.YarnChild.main(YarnChild.java:163)
Caused by: java.io.IOException: error=13, Permission denied
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
2015-03-18 11:50:18,695 INFO ActionEndXCommand:539 - SERVER[bigdata6]
USER[yarn] GROUP[-] TOKEN[] APP[shell-demo]
JOB[0000009-150318112418482-oozie-oozi-W]
ACTION[0000009-150318112418482-oozie-oozi-W@hive-shell] end executor for
wf action 0000009-150318112418482-oozie-oozi-W with wf job
0000009-150318112418482-oozie-oozi-W
2015-03-18 11:50:18,714 INFO ActionEndXCommand:539 - SERVER[bigdata6]
USER[yarn] GROUP[-] TOKEN[] APP[shell-demo]
JOB[0000009-150318112418482-oozie-oozi-W]
ACTION[0000009-150318112418482-oozie-oozi-W@hive-shell] ERROR is
considered as FAILED for SLA
2015-03-18 11:50:18,727 WARN JPAService:542 - SERVER[bigdata6] USER[-]
GROUP[-] TOKEN[-] APP[-] JOB[-] ACTION[-] JPAExecutor
[WorkflowActionGetJPAExecutor] ended with an active transaction, rolling
back
2015-03-18 11:50:18,738 INFO ActionStartXCommand:539 - SERVER[bigdata6]
USER[yarn] GROUP[-] TOKEN[] APP[shell-demo]
JOB[0000009-150318112418482-oozie-oozi-W]
ACTION[0000009-150318112418482-oozie-oozi-W@kill] Start action
[0000009-150318112418482-oozie-oozi-W@kill] with user-retry state :
userRetryCount [0], userRetryMax [0], userRetryInterval [10]
2015-03-18 11:50:18,738 WARN ActionStartXCommand:542 - SERVER[bigdata6]
USER[yarn] GROUP[-] TOKEN[] APP[shell-demo]
JOB[0000009-150318112418482-oozie-oozi-W]
ACTION[0000009-150318112418482-oozie-oozi-W@kill]
[***0000009-150318112418482-oozie-oozi-W@kill***]Action status=DONE
2015-03-18 11:50:18,738 WARN ActionStartXCommand:542 - SERVER[bigdata6]
USER[yarn] GROUP[-] TOKEN[] APP[shell-demo]
JOB[0000009-150318112418482-oozie-oozi-W]
ACTION[0000009-150318112418482-oozie-oozi-W@kill]
[***0000009-150318112418482-oozie-oozi-W@kill***]Action updated in DB!
2015-03-18 11:50:18,749 INFO ActionEndXCommand:539 - SERVER[bigdata6]
USER[yarn] GROUP[-] TOKEN[] APP[shell-demo]
JOB[0000009-150318112418482-oozie-oozi-W]
ACTION[0000009-150318112418482-oozie-oozi-W@kill] end executor for wf
action 0000009-150318112418482-oozie-oozi-W with wf job
0000009-150318112418482-oozie-oozi-W
2015-03-18 11:50:18,775 WARN CoordActionUpdateXCommand:542 -
SERVER[bigdata6..int] USER[yarn] GROUP[-] TOKEN[] APP[shell-demo]
JOB[0000009-150318112418482-oozie-oozi-W] ACTION[-] E1100: Command
precondition does not hold before execution, [, coord action is null],
Error Code: E1100
Any hints?
--
Margus (margusja) Roo
http://margus.roo.ee
skype: margusja
+372 51 480