一直都是同一种方式在hue上定义workflow,不知为啥 今天定义的就是不行.....java
一直报错,无论反复建立文件或者脚本多少遍,也无论从新定义workflow多少遍,报错信息始终以下:linux
Failing Oozie Launcher, Main class [org.apache.oozie.action.hadoop.ShellMain], main() threw exception, Cannot run program "kpitime_nb.sh"
(in directory "/hadoopdata/hadoopdata03/yarn/nm/usercache/hadouser_hw/appcache/application_1567429685851_473626/container_e133_1567429685851_473626_01_000002"):
error=2, No such file or directory java.io.IOException: Cannot run program "kpitime_nb.sh"
(in directory "/hadoopdata/hadoopdata03/yarn/nm/usercache/hadouser_hw/appcache/application_1567429685851_473626/container_e133_1567429685851_473626_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 "kpitime_nb.sh"
(in directory "/hadoopdata/hadoopdata03/yarn/nm/usercache/hadouser_hw/appcache/application_1567429685851_473626/container_e133_1567429685851_473626_01_000002"): error=2, No such file or directory java.io.IOException: Cannot run program "kpitime_nb.sh"
(in directory "/hadoopdata/hadoopdata03/yarn/nm/usercache/hadouser_hw/appcache/application_1567429685851_473626/container_e133_1567429685851_473626_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: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:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) 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:422) at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1924) 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.(UNIXProcess.java:247) at java.lang.ProcessImpl.start(ProcessImpl.java:134) at java.lang.ProcessBuilder.start(ProcessBuilder.java:1029) ... 17 more Oozie Launcher failed, finishing Hadoop job gracefully Oozie Launcher, uploading action data to HDFS sequence file: hdfs://nameservice1/user/hadouser_hw/oozie-oozi/0601578-190930164011975-oozie-oozi-W/shell-01cc--shell/action-data.seq Successfully reset security manager from org.apache.oozie.action.hadoop.LauncherSecurityManager@1cb3ec38 to null Oozie Launcher ends
在这个问题上纠结了一成天的我都快要怀疑人生了...shell
想过会不会是HUE的忽然失灵,清除浏览器缓存 从新登陆试试apache
想过会不会又是脚本编码问题 查了一遍都是UTF-8呀......windows
想过会不会是目录权限问题 挨个的比对了一遍 都同样呀浏览器
........缓存
而后,想了想 总共四个脚本 其中脚本能够正常执行,可是另外的3个脚本为何就会报错呢!!!app
而后 咱们来看一下脚本的隐藏信息工具
经常使用的编辑文件的工具: NotePad++oop
点击下图标记的工具类按钮:【显示全部字符】,咱们就会发现这里的换行符 是 windows的换行符 \r\n(CR LF) ,linux上识别不了 (llinux识别的是 \n (LF))
替换windows换行符(\r\n)\为linux的换行符 (\r)
替换后的文件以下:(再从新上传到HUE,执行对应的workflow便可)
调度绿色经过,开开心心!!!