diff --git a/dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/runner/WorkflowExecuteRunnable.java b/dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/runner/WorkflowExecuteRunnable.java index 012cc8149a6fb..b558d6cf37454 100644 --- a/dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/runner/WorkflowExecuteRunnable.java +++ b/dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/runner/WorkflowExecuteRunnable.java @@ -490,6 +490,16 @@ public void releaseTaskGroup(TaskInstance taskInstance) { } else { ProcessInstance processInstance = processService.findProcessInstanceById(nextTaskInstance.getProcessInstanceId()); + if (processInstance == null) { + log.error("WorkflowInstance is null cannot wakeup, processInstanceId:{}", + nextTaskInstance.getProcessInstanceId()); + return; + } + if (processInstance.getHost() == null || Constants.NULL.equals(processInstance.getHost())) { + log.warn("The next WorkflowInstance: {} host is null no need to wakeup, maybe it is in failover", + processInstance); + return; + } ILogicTaskInstanceOperator taskInstanceOperator = SingletonJdkDynamicRpcClientProxyFactory .getProxyClient(processInstance.getHost(), ILogicTaskInstanceOperator.class); taskInstanceOperator.wakeupTaskInstance(