apache/dolphinscheduler · error · ServiceException

WorkflowInstance: %s pause failed: %s

Error message

WorkflowInstance: %s pause failed: %s

What it means

Thrown when the master, contacted at the instance's host, responds to a WorkflowInstancePauseRequest with either null or a non-success response. The pause command reached the master but the master could not pause the running instance.

Source

Thrown at dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/executor/workflow/PauseWorkflowInstanceExecutorDelegate.java:100

            return null;
        });
        log.info("Update workflow instance {} state from: {} to {} success",
                workflowInstance.getName(),
                workflowInstance.getState().name(),
                WorkflowExecutionStatus.PAUSE.name());
    }

    private void pauseInMaster(WorkflowInstance workflowInstance) {
        try {
            final WorkflowInstancePauseResponse pauseResponse = Clients
                    .withService(IWorkflowControlClient.class)
                    .withHost(workflowInstance.getHost())
                    .pauseWorkflowInstance(new WorkflowInstancePauseRequest(workflowInstance.getId()));

            if (pauseResponse != null && pauseResponse.isSuccess()) {
                log.info("WorkflowInstance: {} pause success", workflowInstance.getName());
            } else {
                throw new ServiceException(
                        "WorkflowInstance: " + workflowInstance.getName() + " pause failed: " + pauseResponse);
            }
        } catch (ServiceException e) {
            throw e;
        } catch (Exception e) {
            throw new ServiceException(
                    String.format("WorkflowInstance: %s pause failed", workflowInstance.getName()), e);
        }
    }

    public static class PauseWorkflowInstanceOperation {

        private final PauseWorkflowInstanceExecutorDelegate pauseWorkflowInstanceExecutorDelegate;

        private WorkflowInstance workflowInstance;

        private User executeUser;

View on GitHub (pinned to 02eac45a1b)

Solutions

  1. Read pauseResponse in the exception message for the master's failure detail and check master logs
  2. Verify the instance's host is still the active master; if a failover occurred, wait for failover or restart the workflow instance
  3. Retry the pause once the master is healthy and the instance is in a pausable state
  4. Check RPC connectivity between API server and the master host/port

Example fix

// before: pausing via stale host after master restart
api.pauseWorkflowInstance(instanceId);
// after: refresh instance state/host first, then pause
WorkflowInstance wf = api.queryWorkflowInstance(instanceId);
if (wf.getState().isCanPause() && hostIsAlive(wf.getHost())) {
    api.pauseWorkflowInstance(instanceId);
}
Defensive patterns

Strategy: try-catch

Validate before calling

// confirm instance host is an alive master before pausing
boolean hostAlive = registryClient.getServerList(RegistryNodeType.MASTER).stream()
    .anyMatch(s -> (s.getHost() + ":" + s.getPort()).equals(instance.getHost()));

Try / catch

try { delegate.pause(op); } catch (ServiceException e) { log.error("Pause failed: {}", e.getMessage()); if (instanceStateRefreshedStillPausable(instance)) retryWithBackoff(op); }

Prevention

When it happens

Trigger: pauseInMaster sends the pause request via IWorkflowControlClient to workflowInstance.getHost(); the master returns success=false (e.g. instance not found on that master, task cannot be interrupted, DB update failed) or the response is null.

Common situations: Instance host is stale after master failover (instance belongs to a dead master); workflow in a state where the master cannot interrupt tasks; master-side exceptions during pause; network/RPC issues swallowed by the outer catch and rethrown here when pauseResponse is null.

Related errors


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