{"record":{"id":"9717ae171d2999e2","repo":"apache/dolphinscheduler","slug":"backfill-workflow-failed-s","errorCode":null,"errorMessage":"Backfill workflow failed: %s","messagePattern":"Backfill workflow failed: (.+?)","errorType":"exception","errorClass":"ServiceException","httpStatus":null,"severity":"error","filePath":"dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/executor/workflow/BackfillWorkflowExecutorDelegate.java","lineNumber":196,"sourceCode":"                .workflowCode(workflowDefinition.getCode())\n                .workflowVersion(workflowDefinition.getVersion())\n                .startNodes(backfillWorkflowDTO.getStartNodes())\n                .failureStrategy(backfillWorkflowDTO.getFailureStrategy())\n                .taskDependType(backfillWorkflowDTO.getTaskDependType())\n                .warningType(backfillWorkflowDTO.getWarningType())\n                .warningGroupId(backfillWorkflowDTO.getWarningGroupId())\n                .workflowInstancePriority(backfillWorkflowDTO.getWorkflowInstancePriority())\n                .workerGroup(backfillWorkflowDTO.getWorkerGroup())\n                .tenantCode(backfillWorkflowDTO.getTenantCode())\n                .environmentCode(backfillWorkflowDTO.getEnvironmentCode())\n                .startParamList(backfillWorkflowDTO.getStartParamList())\n                .dryRun(backfillWorkflowDTO.getDryRun())\n                .build();\n\n        final WorkflowBackfillTriggerResponse backfillTriggerResponse =\n                triggerBackfillWorkflow(backfillTriggerRequest, masterServer);\n        if (!backfillTriggerResponse.isSuccess()) {\n            throw new ServiceException(\"Backfill workflow failed: \" + backfillTriggerResponse.getMessage());\n        }\n        return backfillTriggerResponse.getWorkflowInstanceId();\n    }\n\n    protected WorkflowBackfillTriggerResponse triggerBackfillWorkflow(final WorkflowBackfillTriggerRequest request,\n                                                                      final Server masterServer) {\n        return Clients\n                .withService(IWorkflowControlClient.class)\n                .withHost(masterServer.getHost() + \":\" + masterServer.getPort())\n                .backfillTriggerWorkflow(request);\n    }\n\n    /**\n     * Builds {@link BackfillWorkflowDTO} list for resolved downstream workflows.\n     * {@link RunMode} in each downstream {@link BackfillWorkflowDTO.BackfillParamsDTO} matches the root (see\n     * {@link #executeWithDependentExpansion(BackfillWorkflowDTO)}).\n     */\n    private List<BackfillWorkflowDTO> buildResolvedDownstreamBackfillDtos(final BackfillWorkflowDTO backfillWorkflowDTO,","sourceCodeStart":178,"sourceCodeEnd":214,"githubUrl":"https://github.com/apache/dolphinscheduler/blob/02eac45a1b6676e639fcbfb4be2243de5771b05d/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/executor/workflow/BackfillWorkflowExecutorDelegate.java#L178-L214","documentation":"Thrown after the API forwards a workflow-backfill trigger request to a master and the master responds with a non-success WorkflowBackfillTriggerResponse. The master rejected or failed the backfill; the master's own error message is wrapped into this ServiceException.","triggerScenarios":"triggerBackfillWorkflow(...) returns a response whose isSuccess() is false — e.g. master-side validation of the backfill request failed, schedule/definition problems, or an internal master error during trigger processing.","commonSituations":"Backfilling with an invalid time range or command parameters the master rejects; workflow definition modified/deleted concurrently; master internal errors (DB failures, command insert failures); version mismatch between API and master producing malformed requests.","solutions":["Read backfillTriggerResponse.getMessage() in the exception text — it contains the master's root cause; fix that specific issue","Verify the workflow definition is valid and not deleted/modified before backfilling","Check master server logs at the time of the trigger for the underlying stack trace","Confirm API and master versions are compatible (same release line)","Retry the backfill after correcting parameters or cluster issues"],"exampleFix":"// before\nBackfillWorkflowRequest req = BackfillWorkflowRequest.builder()\n    .workflowDefinition(wf).backfillDateTimes(dates).dryRun(false).build();\n// after: dry-run first to surface master-side rejection before real backfill\nBackfillWorkflowRequest req = BackfillWorkflowRequest.builder()\n    .workflowDefinition(wf).backfillDateTimes(dates)\n    .dryRun(true) // validate first\n    .build();","handlingStrategy":"try-catch","validationCode":"// pre-validate backfill inputs: definition exists and dates non-empty\nif (wfDefinition == null || backfillDates.isEmpty()) throw new IllegalArgumentException(\"invalid backfill request\");","typeGuard":null,"tryCatchPattern":"try { delegate.backfill(dto, dates); } catch (ServiceException e) { log.error(\"Master rejected backfill: {}\", e.getMessage()); throw new BackfillException(e.getMessage(), e); }","preventionTips":["Use dryRun=true first to validate the backfill with the master","Keep API and master on compatible versions","Log and inspect the master's response message included in the exception","Validate workflow definition integrity before backfilling"],"tags":["dolphinscheduler","master-rpc","backfill","api-error"],"backgroundTag":"api-error-response","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"}