{"record":{"id":"8ee548b3a7f2e647","repo":"apache/dolphinscheduler","slug":"pause-task-taskexecution-getname-from","errorCode":null,"errorMessage":"\"Pause task: \" + taskExecution.getName() + \" from executor failed\"","messagePattern":"\"Pause task: \" \\+ taskExecution\\.getName\\(\\) \\+ \" from executor failed\"","errorType":"exception","errorClass":"TaskPauseException","httpStatus":null,"severity":"error","filePath":"dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/engine/task/client/TaskExecutorClient.java","lineNumber":80,"sourceCode":"\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 {\n            getTaskExecutorClientDelegator(taskExecution).kill(taskExecution);\n        } catch (Exception ex) {\n            throw new TaskKillException(\"Kill task: \" + taskExecution.getName() + \" from executor failed\", ex);\n        }\n    }\n\n    @Override\n    public void ackTaskExecutorLifecycleEvent(\n                                              final ITaskExecution taskExecution,\n                                              final ITaskExecutorLifecycleEventReporter.TaskExecutorLifecycleEventAck taskExecutorLifecycleEventAck) {\n        try {","sourceCodeStart":62,"sourceCodeEnd":98,"githubUrl":"https://github.com/apache/dolphinscheduler/blob/02eac45a1b6676e639fcbfb4be2243de5771b05d/dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/engine/task/client/TaskExecutorClient.java#L62-L98","documentation":"Thrown as TaskPauseException when a request to pause a running task on its executor fails. TaskExecutorClient.pause delegates to the executor client delegator; any exception during the RPC is wrapped with the task name in this message. The master's pause workflow request could not be delivered or accepted.","triggerScenarios":"Calling pause(ITaskExecution) when the executor is unreachable, the RPC throws (timeout, connection refused, serialization error), or the delegator cannot handle the task type.","commonSituations":"User clicks 'pause workflow' while a worker is down or network is flaky; executor restarted mid-run; task type lacking a pause-capable delegator; firewall blocking master->worker traffic.","solutions":["Inspect the cause of TaskPauseException to see whether it is connectivity or executor-side rejection.","Verify the worker/executor hosting the task is alive and reachable.","Retry the pause operation after connectivity is restored; alternatively kill and restart the workflow.","Check worker-group/address configuration in the workflow definition."],"exampleFix":"// before\ntry { client.pause(taskExecution); } catch (Exception e) { log.error(\"pause failed\", e); }\n\n// after\ntry {\n    client.pause(taskExecution);\n} catch (TaskPauseException e) {\n    log.error(\"Pause of task {} failed: {}\", taskExecution.getName(), e.getCause().getMessage());\n    alertService.notifyOperator(taskExecution.getName(), e);\n}","handlingStrategy":"try-catch","validationCode":"// verify worker is alive before pausing\nif (!registryClient.checkNodeExists(taskExecution.getHost(), NodeType.WORKER)) {\n    throw new IllegalStateException(\"Worker \" + taskExecution.getHost() + \" is down; pause will fail\");\n}","typeGuard":null,"tryCatchPattern":"try {\n    client.pause(taskExecution);\n} catch (TaskPauseException e) {\n    log.error(\"Pause of {} failed: {}\", taskExecution.getName(), e.getCause().getMessage());\n}","preventionTips":["Check worker liveness in the registry before issuing pause.","Set sensible RPC timeouts so pauses fail fast instead of hanging.","Alert on worker outages so users pause workflows only when workers are healthy."],"tags":["pause","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-14T00:17:10.932Z"}