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 statusView on GitHub (pinned to 02eac45a1b)
Solutions
- Read the chained cause 'e' in the log — it carries the real AWS SDK error (AuthFailure, ValidationException, throttling).
- Verify the AWS credentials and region on the SageMaker datasource in DolphinScheduler.
- Ensure the IAM identity has sagemaker:StartPipelineExecution permission for the pipeline.
- Test the StartPipelineExecutionRequest JSON against the AWS CLI to confirm the pipeline name and parameters are valid.
- 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
- Verify AWS credentials and region on the SageMaker datasource before scheduling
- Grant sagemaker:StartPipelineExecution to the IAM identity
- Test the pipeline start manually via AWS CLI first
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
- emr task submit fail
- cancel application error
- remote.logging.s3.bucket.name is blank
- bucketName: <bucketName> is not exists, you need to create t
- bucketName: ${bucketName} is not exists, you need to create
AI-assisted analysis of apache/dolphinscheduler@02eac45a1b (2026-09-06).
Data as JSON: /api/errors/36bed67bc4973d22.
Report an issue: GitHub.