troubleshooting-执行导数shell脚本抛异常error=2, No such file or directory

Cannot run program "order_log.sh" (in directory "/data/yarn/nm/usercache/chenweidong/appcache/application_1536202736675_0048/container_1536202736675_0048_01_000001"): error=2, No such file or directory

原因分析

1)shell脚本格式不是 unix格式

处理:

vi shell.sh 

:set ff=unix

保存退出

ff = fileformat

本次说明是第二种情况

2)hue webUI执行workflow 中缺失 file 标签

解决方法

<shell xmlns="uri:oozie:shell-action:0.1">
<job-tracker>master.prodcdh.com:8032</job-tracker>
<name-node>hdfs://master.prodcdh.com:8020</name-node>
<exec>/user/chenweidong/order_log.sh</exec>
<file>/user/chenweidong/order_log.sh#order_log.sh</file>
<argument>user_bank</argument>
<capture-output />
<configuration />
</shell>

异常日志

2018-09-07 17:19:06,080 INFO org.apache.oozie.action.hadoop.ShellActionExecutor: SERVER[master.prodcdh.com] USER[chenweidong] GROUP[-] TOKEN[] APP[My Workflow] JOB[0000001-180907154815305-oozie-oozi-W] ACTION[0000001-180907154815305-oozie-oozi-W@shell-9e1d] action completed, external ID [application_1536202736675_0048]
2018-09-07 17:19:06,080 WARN org.apache.oozie.action.hadoop.ShellActionExecutor: SERVER[master.prodcdh.com] USER[chenweidong] GROUP[-] TOKEN[] APP[My Workflow] JOB[0000001-180907154815305-oozie-oozi-W] ACTION[0000001-180907154815305-oozie-oozi-W@shell-9e1d] Launcher ERROR, reason: Cannot run program "order_log.sh" (in directory "/data/yarn/nm/usercache/chenweidong/appcache/application_1536202736675_0048/container_1536202736675_0048_01_000001"): error=2, No such file or directory
2018-09-07 17:19:06,080 WARN org.apache.oozie.action.hadoop.ShellActionExecutor: SERVER[master.prodcdh.com] USER[chenweidong] GROUP[-] TOKEN[] APP[My Workflow] JOB[0000001-180907154815305-oozie-oozi-W] ACTION[0000001-180907154815305-oozie-oozi-W@shell-9e1d] Launcher exception: Cannot run program "order_log.sh" (in directory "/data/yarn/nm/usercache/chenweidong/appcache/application_1536202736675_0048/container_1536202736675_0048_01_000001"): error=2, No such file or directory
java.io.IOException: Cannot run program "order_log.sh" (in directory "/data/yarn/nm/usercache/chenweidong/appcache/application_1536202736675_0048/container_1536202736675_0048_01_000001"): 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:114)
at org.apache.oozie.action.hadoop.ShellMain.run(ShellMain.java:73)
at org.apache.oozie.action.hadoop.LauncherMain.run(LauncherMain.java:101)
at org.apache.oozie.action.hadoop.ShellMain.main(ShellMain.java:63)
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:498)
at org.apache.oozie.action.hadoop.LauncherAM.runActionMain(LauncherAM.java:410)
at org.apache.oozie.action.hadoop.LauncherAM.access$300(LauncherAM.java:55)
at org.apache.oozie.action.hadoop.LauncherAM$2.run(LauncherAM.java:223)
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:1685)
at org.apache.oozie.action.hadoop.LauncherAM.run(LauncherAM.java:217)
at org.apache.oozie.action.hadoop.LauncherAM$1.run(LauncherAM.java:153)
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:1685)
at org.apache.oozie.action.hadoop.LauncherAM.main(LauncherAM.java:141)
Caused by: java.io.IOException: error=2, No such file or directory
at java.lang.UNIXProcess.forkAndExec(Native Method)
at java.lang.UNIXProcess.(UNIXProcess.java:247)
at java.lang.ProcessImpl.start(ProcessImpl.java:134)
at java.lang.ProcessBuilder.start(ProcessBuilder.java:1029)
... 20 more

 

转载于:https://www.cnblogs.com/chwilliam85/p/9693302.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值