azkaban报错ProcessFailureException
故障上报
- 执行一个
type=command
的command=mysql -uxxx -pxxx -Dxxx < "sqlScript/cte.sql"
任务报错 azkaban.jobExecutor.utils.process.ProcessFailureException: Process exited with code 1
11-04-2024 14:59:45 CST RK_RZYH_T_CF_SP_01 ERROR - Job run failed!
java.lang.RuntimeException: azkaban.jobExecutor.utils.process.ProcessFailureException: Process exited with code 1
... 8 more
Caused by: azkaban.jobExecutor.utils.process.ProcessFailureException: Process exited with code 1
... 8 more
11-04-2024 14:59:45 CST RK_RZYH_T_CF_SP_01 ERROR - azkaban.jobExecutor.utils.process.ProcessFailureException:
Process exited with code 1 cause: azkaban.jobExecutor.utils.process.ProcessFailureException: Process exited with code 1
11-04-2024 14:59:45 CST RK_RZYH_T_CF_SP_01 INFO - Finishing job RK_RZYH_T_CF_SP_01 at 1712818785455 with status FAILED
解决方案
- 1.确认job脚本为unix格式,使用 notepad++ - 编辑 - 文档格式转换 - 转换为UNIX格式
- 2.确认脚本中涉及的程序在所有exec-server上都有安装
- 3.若脚本中涉及的命令没有配置环境变量,则建议使用全路径
- 4.sql脚本中不要有注释(亲测有效,此case原因在此)
- 5.若sql脚本执行报错,比如数据格式问题导致的失败,都会造成此错误(亲测有效)