{"record":{"id":"30652d96a6c4541c","repo":"apache/dolphinscheduler","slug":"take-over-task-taskexecution-getname-f","errorCode":null,"errorMessage":"\"Take over task: \" + taskExecution.getName() + \" from executor failed\"","messagePattern":"\"Take over task: \" \\+ taskExecution\\.getName\\(\\) \\+ \" from executor failed\"","errorType":"exception","errorClass":"TaskReassignMasterHostException","httpStatus":null,"severity":"error","filePath":"dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/engine/task/client/TaskExecutorClient.java","lineNumber":69,"sourceCode":"    @Override\n    public void dispatch(ITaskExecution taskExecution) throws TaskDispatchException {\n        try {\n            getTaskExecutorClientDelegator(taskExecution).dispatch(taskExecution);\n        } catch (TaskDispatchException taskDispatchException) {\n            throw taskDispatchException;\n        } catch (Exception ex) {\n            throw new TaskDispatchException(\"Dispatch task: \" + taskExecution.getName() + \" to executor failed\",\n                    ex);\n        }\n    }\n\n    @Override\n    public boolean reassignWorkflowInstanceHost(final ITaskExecution taskExecution) throws TaskReassignMasterHostException {\n        try {\n            return getTaskExecutorClientDelegator(taskExecution)\n                    .reassignMasterHost(taskExecution);\n        } catch (Exception ex) {\n            throw new TaskReassignMasterHostException(\n                    \"Take over task: \" + taskExecution.getName() + \" from executor failed\",\n                    ex);\n        }\n    }\n\n    @Override\n    public void pause(final ITaskExecution taskExecution) throws TaskPauseException {\n        try {\n            getTaskExecutorClientDelegator(taskExecution).pause(taskExecution);\n        } catch (Exception ex) {\n            throw new TaskPauseException(\"Pause task: \" + taskExecution.getName() + \" from executor failed\",\n                    ex);\n        }\n    }\n\n    @Override\n    public void kill(final ITaskExecution taskExecution) throws TaskKillException {\n        try {","sourceCodeStart":51,"sourceCodeEnd":87,"githubUrl":"https://github.com/apache/dolphinscheduler/blob/02eac45a1b6676e639fcbfb4be2243de5771b05d/dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/engine/task/client/TaskExecutorClient.java#L51-L87","documentation":"This message wraps any exception thrown while asking a remote executor (via the delegator client) to take over (reassign master host for) a running task during master failover. TaskExecutorClient.reassignWorkflowInstanceHost delegates to getTaskExecutorClientDelegator(taskExecution).reassignMasterHost; any failure there (network, timeout, RPC error) is rethrown as TaskReassignMasterHostException with the task name in the message. It signals that the task handover to the new master could not be completed.","triggerScenarios":"Calling reassignWorkflowInstanceHost(ITaskExecution) when the target executor is unreachable, the RPC call times out, the executor rejects the reassign request, or the delegator lookup/dispatch itself throws any Exception.","commonSituations":"Master failover after a master crash while workers/executors are down or partitioned; network misconfiguration between master and worker (wrong worker address, firewall, DNS); executor busy or restarted during take-over; version mismatch in the RPC contract between master and executor.","solutions":["Verify network connectivity from the master to the executor host/port (ping, telnet, check firewall/security groups).","Check the executor/worker logs for the root cause exception carried as the cause of TaskReassignMasterHostException.","Retry the failover take-over once the executor is back; DolphinScheduler retries failed tasks if configured.","Confirm worker address configuration and that the executor process is running and registered with the registry center."],"exampleFix":"// before: blindly reassigning during failover\nclient.reassignWorkflowInstanceHost(taskExecution);\n\n// after: check executor reachability and handle failure\ntry {\n    client.reassignWorkflowInstanceHost(taskExecution);\n} catch (TaskReassignMasterHostException e) {\n    log.error(\"Task {} take-over failed, will rely on failover retry\", taskExecution.getName(), e.getCause());\n    failoverRetryQueue.add(taskExecution);\n}","handlingStrategy":"try-catch","validationCode":"// before reassigning, check executor reachability\nboolean reachable = false;\ntry (Socket s = new Socket()) {\n    s.connect(new InetSocketAddress(taskExecution.getHost(), workerPort), 3000);\n    reachable = true;\n} catch (IOException ignored) { }\nif (!reachable) throw new IllegalStateException(\"Executor host unreachable, skip reassign\");","typeGuard":null,"tryCatchPattern":"try {\n    client.reassignWorkflowInstanceHost(taskExecution);\n} catch (TaskReassignMasterHostException e) {\n    log.error(\"Take over of {} failed, cause: {}\", taskExecution.getName(), e.getCause().getMessage());\n    scheduleFailoverRetry(taskExecution);\n}","preventionTips":["Monitor master-to-worker network health and worker liveness via the registry center.","Keep worker address configuration correct and consistent across masters.","Enable automatic failover retries so transient take-over failures self-heal."],"tags":["master-failover","rpc","task-executor","network"],"backgroundTag":"network-request-failed","analyzedSha":"02eac45a1b6676e639fcbfb4be2243de5771b05d","analyzedAt":"2026-09-06T17:43:00.555Z","contentChangedAt":"2026-09-06T17:43:00.555Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}