{"record":{"id":"5b59eae785059832","repo":"apache/dolphinscheduler","slug":"dispatch-task-taskname-to-physicalta","errorCode":null,"errorMessage":"\"Dispatch task: \" + taskName + \" to \" + physicalTaskExecutorAddress + \" failed: \" + taskExecutorDispatchResponse","messagePattern":"\"Dispatch task: \" \\+ taskName \\+ \" to \" \\+ physicalTaskExecutorAddress \\+ \" failed: \" \\+ taskExecutorDispatchResponse","errorType":"exception","errorClass":"TaskDispatchException","httpStatus":null,"severity":"error","filePath":"dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/engine/task/client/PhysicalTaskExecutorClientDelegator.java","lineNumber":91,"sourceCode":"        }\n\n        // select an available worker from the worker group; throws NoAvailableWorkerException if none is available.\n        final String physicalTaskExecutorAddress = workerLoadBalancer\n                .select(workerGroup)\n                .map(Host::of)\n                .map(Host::getAddress)\n                .orElseThrow(() -> new NoAvailableWorkerException(workerGroup));\n\n        taskExecutionContext.setHost(physicalTaskExecutorAddress);\n        taskExecution.getTaskInstance().setHost(physicalTaskExecutorAddress);\n\n        try {\n            final TaskExecutorDispatchResponse taskExecutorDispatchResponse = Clients\n                    .withService(IPhysicalTaskExecutorOperator.class)\n                    .withHost(physicalTaskExecutorAddress)\n                    .dispatchTask(TaskExecutorDispatchRequest.of(taskExecution.getTaskExecutionContext()));\n            if (!taskExecutorDispatchResponse.isDispatchSuccess()) {\n                throw new TaskDispatchException(\n                        \"Dispatch task: \" + taskName + \" to \" + physicalTaskExecutorAddress + \" failed: \"\n                                + taskExecutorDispatchResponse);\n            }\n        } catch (TaskDispatchException e) {\n            throw e;\n        } catch (Exception e) {\n            throw new TaskDispatchException(\n                    \"Dispatch task: \" + taskName + \" to \" + physicalTaskExecutorAddress + \" failed\", e);\n        }\n    }\n\n    @Override\n    public boolean reassignMasterHost(final ITaskExecution taskExecution) {\n        final String taskName = taskExecution.getName();\n        checkArgument(taskExecution.isTaskInstanceInitialized(),\n                \"Task \" + taskName + \"is not initialized cannot take-over\");\n\n        final TaskInstance taskInstance = taskExecution.getTaskInstance();","sourceCodeStart":73,"sourceCodeEnd":109,"githubUrl":"https://github.com/apache/dolphinscheduler/blob/02eac45a1b6676e639fcbfb4be2243de5771b05d/dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/engine/task/client/PhysicalTaskExecutorClientDelegator.java#L73-L109","documentation":"The master selected a worker and sent the dispatch RPC, but the worker's IPhysicalTaskExecutorOperator.dispatchTask returned a TaskExecutorDispatchResponse that is not successful, so a TaskDispatchException is thrown including the worker address and response details. Unlike error 613, the RPC completed — the worker explicitly reported the dispatch as failed.","triggerScenarios":"Clients.withService(IPhysicalTaskExecutorOperator.class).withHost(address).dispatchTask(TaskExecutorDispatchRequest.of(ctx)) succeeds at the transport level, but the response's isDispatchSuccess() is false.","commonSituations":"Worker rejects the task because its task plugin for that type is missing or incompatible (master/worker version skew); worker out of memory/disk or thread pool exhausted; task resource (jar/script) download fails on the worker; worker in a bad state right after startup or during shutdown.","solutions":["Read the appended TaskExecutorDispatchResponse in the message for the worker's failure reason and fix that cause","Confirm the worker has the task plugin installed and its version matches the master","Check worker logs and resources (memory, disk, task-exec threads) around the failure timestamp","Retry the task/workflow instance once the worker is healthy; consider draining/restarting the problematic worker"],"exampleFix":"// before\n// failure only visible after a failed dispatch round-trip\n// after\n// keep worker groups healthy and verified before submitting work\nif (!workerClusters.containsWorkerGroup(workerGroup)) {\n    throw new WorkerGroupNotFoundException(workerGroup); // fail fast instead of a worker-side rejection\n}","handlingStrategy":"retry","validationCode":"// keep the worker group verified before dispatch\nif (!clusterManager.getWorkerClusters().containsWorkerGroup(workerGroup)) {\n    throw new WorkerGroupNotFoundException(workerGroup);\n}","typeGuard":"boolean dispatchSucceeded(TaskExecutorDispatchResponse r) { return r != null && r.isDispatchSuccess(); }","tryCatchPattern":"try {\n    taskExecutorClient.dispatch(taskExecution);\n} catch (TaskDispatchException e) {\n    log.warn(\"Dispatch to worker failed ({}), scheduling retry\", e.getMessage());\n    // re-enqueue via workflow retry strategy\n}","preventionTips":["Keep master and worker plugin versions identical","Monitor worker memory/disk/thread-pool headroom","Drain and restart workers that repeatedly reject dispatches","Enable workflow/task-level retry counts for transient worker-side failures"],"tags":["rpc","worker","task-dispatch"],"backgroundTag":"task-dispatch-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"}