apache/dolphinscheduler · error · TaskPauseException

"Pause task: " + taskExecution.getName() + " from executor…

Error message

"Pause task: " + taskExecution.getName() + " from executor failed"

What it means

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.

Solutions

  1. Inspect the cause of TaskPauseException to see whether it is connectivity or executor-side rejection.
  2. Verify the worker/executor hosting the task is alive and reachable.
  3. Retry the pause operation after connectivity is restored; alternatively kill and restart the workflow.
  4. Check worker-group/address configuration in the workflow definition.

Example fix

// before
try { client.pause(taskExecution); } catch (Exception e) { log.error("pause failed", e); }

// after
try {
    client.pause(taskExecution);
} catch (TaskPauseException e) {
    log.error("Pause of task {} failed: {}", taskExecution.getName(), e.getCause().getMessage());
    alertService.notifyOperator(taskExecution.getName(), e);
}
Defensive patterns

Strategy: try-catch

Validate before calling

// verify worker is alive before pausing
if (!registryClient.checkNodeExists(taskExecution.getHost(), NodeType.WORKER)) {
    throw new IllegalStateException("Worker " + taskExecution.getHost() + " is down; pause will fail");
}

Try / catch

try {
    client.pause(taskExecution);
} catch (TaskPauseException e) {
    log.error("Pause of {} failed: {}", taskExecution.getName(), e.getCause().getMessage());
}

Prevention

When it happens

Trigger: Calling pause(ITaskExecution) when the executor is unreachable, the RPC throws (timeout, connection refused, serialization error), or the delegator cannot handle the task type.

Common situations: 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.

Related errors


AI-assisted analysis of apache/dolphinscheduler@02eac45a1b (2026-09-06). Data as JSON: /api/errors/8ee548b3a7f2e647. Report an issue: GitHub.

Appendix: source

Thrown at dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/engine/task/client/TaskExecutorClient.java:80

    @Override
    public boolean reassignWorkflowInstanceHost(final ITaskExecution taskExecution) throws TaskReassignMasterHostException {
        try {
            return getTaskExecutorClientDelegator(taskExecution)
                    .reassignMasterHost(taskExecution);
        } catch (Exception ex) {
            throw new TaskReassignMasterHostException(
                    "Take over task: " + taskExecution.getName() + " from executor failed",
                    ex);
        }
    }

    @Override
    public void pause(final ITaskExecution taskExecution) throws TaskPauseException {
        try {
            getTaskExecutorClientDelegator(taskExecution).pause(taskExecution);
        } catch (Exception ex) {
            throw new TaskPauseException("Pause task: " + taskExecution.getName() + " from executor failed",
                    ex);
        }
    }

    @Override
    public void kill(final ITaskExecution taskExecution) throws TaskKillException {
        try {
            getTaskExecutorClientDelegator(taskExecution).kill(taskExecution);
        } catch (Exception ex) {
            throw new TaskKillException("Kill task: " + taskExecution.getName() + " from executor failed", ex);
        }
    }

    @Override
    public void ackTaskExecutorLifecycleEvent(
                                              final ITaskExecution taskExecution,
                                              final ITaskExecutorLifecycleEventReporter.TaskExecutorLifecycleEventAck taskExecutorLifecycleEventAck) {
        try {

View on GitHub (pinned to 02eac45a1b)