apache/dolphinscheduler · error · ServiceException
Repeat running workflow instance failed: %s
Error message
Repeat running workflow instance failed: %s
What it means
Thrown by RepeatRunningWorkflowInstanceExecutorDelegate.execute when the master's repeatTriggerWorkflowInstance response reports success=false. The repeat-running request reached the master but the master refused or failed to re-trigger the finished workflow instance; the master's message is appended.
Source
Thrown at dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/executor/workflow/RepeatRunningWorkflowInstanceExecutorDelegate.java:65
String.format("The workflow instance: %s status is %s, cannot repeat running",
workflowInstance.getName(), workflowInstance.getState()));
}
final Server masterServer = registryClient.getRandomServer(RegistryNodeType.MASTER).orElse(null);
if (masterServer == null) {
throw new ServiceException("no master server available");
}
final WorkflowInstanceRepeatRunningRequest repeatRunningRequest = WorkflowInstanceRepeatRunningRequest.builder()
.workflowInstanceId(workflowInstance.getId())
.userId(workflowInstanceControlRequest.executeUser.getId())
.build();
final WorkflowInstanceRepeatRunningResponse repeatRunningResponse = Clients
.withService(IWorkflowControlClient.class)
.withHost(masterServer.getHost() + ":" + masterServer.getPort())
.repeatTriggerWorkflowInstance(repeatRunningRequest);
if (!repeatRunningResponse.isSuccess()) {
throw new ServiceException(
"Repeat running workflow instance failed: " + repeatRunningResponse.getMessage());
}
return null;
}
public static class RepeatRunningWorkflowInstanceOperation {
private final RepeatRunningWorkflowInstanceExecutorDelegate repeatRunningWorkflowInstanceExecutorDelegate;
private WorkflowInstance workflowInstance;
private User executeUser;
public RepeatRunningWorkflowInstanceOperation(RepeatRunningWorkflowInstanceExecutorDelegate repeatRunningWorkflowInstanceExecutorDelegate) {
this.repeatRunningWorkflowInstanceExecutorDelegate = repeatRunningWorkflowInstanceExecutorDelegate;
}
View on GitHub (pinned to 02eac45a1b)
Solutions
- Read the appended repeatRunningResponse.getMessage() for the master-side cause
- Verify the workflow definition behind the instance still exists and is enabled (release state online)
- Refresh and confirm the instance still exists and is in a final state, then retry
- Check master server logs at request time for the detailed failure
Example fix
// before
Clients.withService(IWorkflowControlClient.class)...repeatTriggerWorkflowInstance(repeatRunningRequest);
// after
// pre-check definition is online
WorkflowDefinition def = workflowDefinitionDao.findByCode(instance.getWorkflowDefinitionCode());
if (def == null || def.getReleaseState() != ReleaseState.ONLINE) {
throw new ServiceException("Definition offline/deleted, cannot repeat run");
} Defensive patterns
Strategy: try-catch
Validate before calling
WorkflowDefinition def = workflowDefinitionDao.findByCode(instance.getWorkflowDefinitionCode());
if (def == null || def.getReleaseState() != ReleaseState.ONLINE) {
throw new IllegalStateException("Definition missing/offline");
} Try / catch
try {
delegate.execute(op);
} catch (ServiceException e) {
log.error("Repeat running failed: {}", e.getMessage(), e);
// inspect master-side message and master logs
} Prevention
- Verify the definition exists and is online before rerun
- Confirm instance still in final state before rerun
- Log and surface the master response message
- Check master logs when the message is generic
When it happens
Trigger: Calling repeatTriggerWorkflowInstance on a finished instance where the master rejects the command — e.g. the workflow definition was disabled or deleted, the instance no longer exists, or master-side command creation fails.
Common situations: Rerunning an instance whose definition was deleted/renamed between runs; permission or project changes invalidating the definition; master failover mid-request; the instance was recovered by another user concurrently.
Related errors
- Recover workflow instance failed: %s
- The workflow instance: %s status is %s, cannot repeat runnin
- WorkflowInstance: %s stop failed: %s
- WorkflowInstance: %s stop failed
- Trigger workflow failed: %s
AI-assisted analysis of apache/dolphinscheduler@02eac45a1b (2026-09-06).
Data as JSON: /api/errors/69af705ce280a80e.
Report an issue: GitHub.