在海豚调度器用api启动工作流,在海豚调度器的工作流实例看到是启动失败,但在任务失例又没看到。看启动工作流的代码觉得好像没问题,一时不得其解。
后来找到海豚调度器的日志dolphinscheduler-master.log, 看到日志如下:
[ERROR] 2024-06-24 12:27:24.466 org.apache.dolphinscheduler.dao.utils.DagHelper:[101] - start node name [ads_bigdata_xxxx] is not in task node list [[TaskNode{id='tasks-71533', name='ads_bigdata_battery_warning_detail.sh', desc='null', type='SHELL', runFlag='NORMAL', loc='null', maxRetryTimes=0, retryInterval=1, params='{"rawScript":"sh cnsaas/ads_bigdata_battery_warning_detail.sh ${complement_date}","localParams":[],"resourceList":[{"res":"cnsaas/ads_bigdata_xxxx.sh","name":"ads_bigdata_xxxx.sh","id":6},{"res":"cnsaas/ads_bigdata_xxxx.sql","name":"ads_bigdata_xxxx.sql","id":102}]}', preTasks='[]', extras='null', depList=[], dependence='{}', taskInstancePriority=MEDIUM, timeout='{"enable":false,"strategy":""}', workerGroup='default'}]]
[ERROR] 2024-06-24 12:27:24.466 org.apache.dolphinscheduler.server.master.runner.MasterExecThread:[347] - processDag is null
[INFO] 2024-06-24 12:27:24.468 org.apache.dolphinscheduler.server.master.runner.MasterExecThread:[315] - prepare process :10712 end
[ERROR] 2024-06-24 12:27:24.468 org.apache.dolphinscheduler.server.master.runner.MasterExecThread:[184] - master exec thread exception
java.lang.NullPointerException: nullat org.apache.dolphinscheduler.dao.utils.DagHelper.parsePostNodes(DagHelper.java:284)at org.apache.dolphinscheduler.server.master.runner.MasterExecThread.submitPostNode(MasterExecThread.java:482)at org.apache.dolphinscheduler.server.master.runner.MasterExecThread.runProcess(MasterExecThread.java:832)at org.apache.dolphinscheduler.server.master.runner.MasterExecThread.executeProcess(MasterExecThread.java:200)at org.apache.dolphinscheduler.server.master.runner.MasterExecThread.run(MasterExecThread.java:181)at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)at java.lang.Thread.run(Thread.java:748)
[ERROR] 2024-06-24 12:27:24.468 org.apache.dolphinscheduler.server.master.runner.MasterExecThread:[185] - process execute failed, process id:10712
原来启动节点名称(ads_bigdata_xxx
)不在任务节点列表中。这意味着在DAG定义中,可能没有包含这个节点,或者节点的名称有误 。认真检查一下,果然是启动工作流时,任务节点的名称写得有问题,重新修改后果然正常启动工作流了。