一直都是同一種方式在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便可)
調度綠色經過,開開心心!!!