oozie运行shell,namenode缓存没有文件

chenzhikaida 2015-10-16 03:10:57
2015-10-01 18:07:13,627 WARN ShellActionExecutor:544 - SERVER[hadoop-senior.ibeifeng.com] USER[beifeng] GROUP[-] TOKEN[] APP[shell-wf] JOB[0000018-151001122846380-oozie-beif-W] ACTION[0000018-151001122846380-oozie-beif-W@shell-node] Launcher exception: Cannot run program "select.sh" (in directory "/opt/cdh-5.3.6/hadoop-2.5.0-cdh5.3.6/data/nm-local-dir/usercache/beifeng/appcache/application_1443616625551_0030/container_1443616625551_0030_01_000002"): error=2, No such file or directory
java.io.IOException: Cannot run program "select.sh" (in directory "/opt/cdh-5.3.6/hadoop-2.5.0-cdh5.3.6/data/nm-local-dir/usercache/beifeng/appcache/application_1443616625551_0030/container_1443616625551_0030_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:1642)
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)

我的job属性配置如下
nameNode=hdfs://hadoop-senior.ibeifeng.com:8020
jobTracker=hadoop-senior.ibeifeng.com:8032
queueName=default
appRoot=oozie-apps
oozie.use.system.libpath=true
oozie.wf.application.path=${nameNode}/user/${user.name}/${appRoot}/shell
EXEC=select.sh
SCRIPT=hiveselect.sql


我的workflow配置如下

<workflow-app xmlns="uri:oozie:workflow:0.4" name="shell-wf">
<start to="shell-node"/>
<action name="shell-node">
<shell xmlns="uri:oozie:shell-action:0.2">
<job-tracker>${jobTracker}</job-tracker>
<name-node>${nameNode}</name-node>
<configuration>
<property>
<name>mapred.job.queue.name</name>
<value>${queueName}</value>
</property>
</configuration>
<exec>${EXEC}</exec>
<file>${nameNode}/user/beifeng/oozie-apps/shell/${EXEC}#${EXEC}</file>
<file>${nameNode}/user/beifeng/oozie-apps/shell/${SCRIPT}#${SCRIPT}</file>
<capture-output/>
</shell>
<ok to="end"/>
<error to="fail"/>
</action>
<kill name="fail">
<message>Shell action failed, error message[${wf:errorMessage(wf:lastErrorNode())}]</message>
</kill>
<end name="end"/>
</workflow-app>
...全文
2065 2 打赏 收藏 转发到动态 举报
写回复
用AI写文章
2 条回复
切换为时间正序
请发表友善的回复…
发表回复
  • 打赏
  • 举报
回复
我在HUE中创建的workflow,开始也有这个问题,后面将脚本文件添加到这个节点就可以了,参考:https://stackoverflow.com/questions/23628129/running-shell-script-from-oozie-through-hue
crazywind_taotao 2016-10-21
  • 打赏
  • 举报
回复
你这问题最终怎么解决的呢

932

社区成员

发帖
与我相关
我的任务
社区描述
云计算 云存储相关讨论
社区管理员
  • 云存储
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧