不管写多少脚本,都直接报错
报错日志很长,这是最前边的部份,我一开始没有看,只看了最后边的问题,后来才发现这个问题有多坑
2023-12-20 15:29:21,418 WARN org.apache.oozie.action.hadoop.ShellActionExecutor: SERVER[hadoop02] USER[hue] GROUP[-] TOKEN[] APP[My Workflow] JOB[0000000-231220105640851-oozie-oozi-W] ACTION[0000000-231220105640851-oozie-oozi-W@shell-c4f1] Launcher exception: Cannot run program "test.sh" (in directory "/yarn/nm/usercache/hue/appcache/application_1702969350895_0031/container_1702969350895_0031_01_000001"): error=2, No such file or directory
java.io.IOException: Cannot run program "test.sh" (in directory "/yarn/nm/usercache/hue/appcache/application_1702969350895_0031/container_1702969350895_0031_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:104)
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:1875)
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:1875)
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.<init>(UNIXProcess.java:247)
at java.lang.ProcessImpl.start(ProcessImpl.java:134)
at java.lang.ProcessBuilder.start(ProcessBuilder.java:1029)
... 20 more
最后边的日志是这样的
Caused by: org.apache.oozie.executor.jpa.JPAExecutorException: E0603: SQL error in operation, Incorrect string value: '\xE6\x93\x8D\xE4\xBD\x9C...' for column 'error_message' at row 1 {prepstmnt 850503968 UPDATE WF_ACTIONS t0 SET t0.pending = ?, t0.pending_age = NULL, t0.transition = NULL, t0.error_code = ?, t0.error_message = ?, t0.status = ? WHERE (t0.id = ?)} [code=1366, state=HY000]
at org.apache.oozie.service.JPAService.getTargetException(JPAService.java:641)
at org.apache.oozie.service.JPAService.executeBatchInsertUpdateDelete(JPAService.java:538)
at org.apache.oozie.executor.jpa.BatchQueryExecutor.executeBatchInsertUpdateDelete(BatchQueryExecutor.java:132)
at org.apache.oozie.command.wf.SignalXCommand.execute(SignalXCommand.java:440)
... 7 more
我还纳闷为啥报sql的错,查了好多资料才发现是因为我的脚本都在np++里写的,,没有转编码格式,右键点这里选Unix 问题解决