• HUE Oozie : error=2, No such file or directory采坑记录


    HUE Oozie : error=2, No such file or directory采坑记录

    1.错误详情

    一直都是同一种方式在hue上定义workflow,不知为啥 今天定义的就是不行.....

    一直报错,不管反复创建文件或者脚本多少遍,也不管重新定义workflow多少遍,报错信息始终如下:

    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

    2.错误原因  

    在这个问题上纠结了一整天的我都快要怀疑人生了...

    想过会不会是HUE的突然失灵,清除浏览器缓存 重新登录试试

    想过会不会又是脚本编码问题 查了一遍都是UTF-8呀......

    想过会不会是目录权限问题 挨个的比对了一遍 都一样呀

    ........

    然后,想了想 总共四个脚本 其中脚本可以正常执行,但是另外的3个脚本为什么就会报错呢!!!

    然后 我们来看一下脚本的隐藏信息

    常用的编辑文件的工具: NotePad++

    点击下图标记的工具类按钮:【显示所有字符】,我们就会发现这里的换行符 是  windows的换行符 (CR LF) ,linux上识别不了 (llinux识别的是  (LF))

    3.解决方法

    替换windows换行符( )为linux的换行符 ( )

    4.解决效果

    替换后的文件如下:(再重新上传到HUE,执行对应的workflow即可)

    调度绿色通过,开开心心!!!

  • 相关阅读:
    xgqfrms™, xgqfrms® : xgqfrms's offical website of GitHub!
    xgqfrms™, xgqfrms® : xgqfrms's offical website of GitHub!
    xgqfrms™, xgqfrms® : xgqfrms's offical website of GitHub!
    xgqfrms™, xgqfrms® : xgqfrms's offical website of GitHub!
    整理任正非思想:团结奋斗 再创华为佳绩-1994
    整理任正非思想:赴美考察散记-1994
    你不能不知道的六种 Python 图像库的图片读取方法总结
    Spring boot 2.0 Actuator 的健康检查
    Springboot启动后只能本地访问,无法通过外部IP访问
    Ironic 的 Rescue 救援模式实现流程
  • 原文地址:https://www.cnblogs.com/DFX339/p/11694353.html
Copyright © 2020-2023  润新知