apache/dolphinscheduler · error · TaskException

SageMaker task submit error

Error message

SageMaker task submit error

What it means

SagemakerTask.submitApplication() wraps the whole AWS SageMaker startPipelineExecution call in a try/catch and rethrows any failure as TaskException("SageMaker task submit error", e). It means the pipeline could not be started on AWS (client/auth/API issue) — the original cause is always attached.

Source

Thrown at dolphinscheduler-task-plugin/dolphinscheduler-task-sagemaker/src/main/java/org/apache/dolphinscheduler/plugin/task/sagemaker/SagemakerTask.java:123

        log.info("Initialize Sagemaker task params {}", JSONUtils.toPrettyJsonString(parameters));

        client = createClient();
        utils = new PipelineUtils();
    }

    @Override
    public void submitApplication() throws TaskException {
        try {
            StartPipelineExecutionRequest request = createStartPipelineRequest();

            // Start pipeline
            pipelineId = utils.startPipelineExecution(client, request);

            // set AppId
            setAppIds(JSONUtils.toJsonString(pipelineId));
        } catch (Exception e) {
            setExitStatusCode(TaskConstants.EXIT_CODE_FAILURE);
            throw new TaskException("SageMaker task submit error", e);
        }
    }

    @Override
    public void cancelApplication() {
        initPipelineId();
        try {
            // stop pipeline
            utils.stopPipelineExecution(client, pipelineId);
        } catch (Exception e) {
            throw new TaskException("cancel application error", e);
        }
    }

    @Override
    public void trackApplicationStatus() throws TaskException {
        initPipelineId();
        // Keep checking the health status

View on GitHub (pinned to 02eac45a1b)

Solutions

  1. Read the chained cause 'e' in the log — it carries the real AWS SDK error (AuthFailure, ValidationException, throttling).
  2. Verify the AWS credentials and region on the SageMaker datasource in DolphinScheduler.
  3. Ensure the IAM identity has sagemaker:StartPipelineExecution permission for the pipeline.
  4. Test the StartPipelineExecutionRequest JSON against the AWS CLI to confirm the pipeline name and parameters are valid.
  5. If throttled, retry after backoff or raise the AWS service quota.
Defensive patterns

Strategy: try-catch

Validate before calling

// pre-flight: verify credentials/region before submit
awsConfig.validate(); // access key, secret key, region all non-empty

Try / catch

try {
    task.submitApplication();
} catch (TaskException e) {
    log.error("SageMaker submit failed: {}", e.getCause() != null ? e.getCause().getMessage() : e.getMessage(), e);
    // inspect cause: auth vs validation vs throttling
}

Prevention

When it happens

Trigger: utils.startPipelineExecution(client, request) throws: bad AWS credentials/region, invalid StartPipelineExecutionRequest, pipeline name not found, throttling, or network failure; the catch sets exit code failure and rethrows.

Common situations: Wrong AWS access key/secret or missing permission sagemaker:StartPipelineExecution, incorrect region configured on the datasource, typo in PipelineName in the request JSON, or SDK version mismatch producing unparseable responses.

Understand the failure class

Background: "API request failed": what wrapped HTTP errors from external APIs mean and how to find the real cause — this error's family across 29 libraries.

Related errors


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