{"record":{"id":"f162f00ca424503b","repo":"apache/dolphinscheduler","slug":"datasync-task-error","errorCode":null,"errorMessage":"datasync task error","messagePattern":"datasync task error","errorType":"exception","errorClass":"TaskException","httpStatus":null,"severity":"error","filePath":"dolphinscheduler-task-plugin/dolphinscheduler-task-datasync/src/main/java/org/apache/dolphinscheduler/plugin/task/datasync/DatasyncTask.java","lineNumber":109,"sourceCode":"            log.info(\"Success convert json to task params {}\", JSONUtils.toPrettyJsonString(parameters));\n        }\n    }\n\n    @Override\n    public void submitApplication() throws TaskException {\n        try {\n            int exitStatusCode = checkCreateTask();\n            if (exitStatusCode == TaskConstants.EXIT_CODE_FAILURE) {\n                // if create task failure go end\n                setExitStatusCode(exitStatusCode);\n                return;\n            }\n            // start task\n            exitStatusCode = startDatasyncTask();\n            setExitStatusCode(exitStatusCode);\n        } catch (Exception e) {\n            setExitStatusCode(TaskConstants.EXIT_CODE_FAILURE);\n            throw new TaskException(\"datasync task error\", e);\n        }\n        // set taskExecArn to the appIds if start success\n        setAppIds(hook.getTaskExecArn());\n    }\n\n    @Override\n    public void cancelApplication() throws TaskException {\n        checkApplicationId();\n        hook.cancelDatasyncTask();\n    }\n\n    @Override\n    public void trackApplicationStatus() throws TaskException {\n        checkApplicationId();\n        Boolean isFinishedSuccessfully = null;\n        isFinishedSuccessfully = hook.doubleCheckFinishStatus(TaskExecutionStatus.SUCCESS, DatasyncHook.doneStatus);\n        if (!isFinishedSuccessfully) {\n            exitStatusCode = TaskConstants.EXIT_CODE_FAILURE;","sourceCodeStart":91,"sourceCodeEnd":127,"githubUrl":"https://github.com/apache/dolphinscheduler/blob/02eac45a1b6676e639fcbfb4be2243de5771b05d/dolphinscheduler-task-plugin/dolphinscheduler-task-datasync/src/main/java/org/apache/dolphinscheduler/plugin/task/datasync/DatasyncTask.java#L91-L127","documentation":"A catch-all in DatasyncTask.submitApplication: creating or starting the AWS DataSync task threw — invalid endpoint/subnet/security-group parameters, insufficient IAM permissions on the execution role, or an AWS SDK error. checkCreateTask or startDatasyncTask failure is wrapped with exit code set to failure; the caused-by carries the AWS detail.","triggerScenarios":"Thrown at dolphinscheduler-task-plugin/dolphinscheduler-task-datasync/src/main/java/org/apache/dolphinscheduler/plugin/task/datasync/DatasyncTask.java:109 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Inspect the caused-by AwsServiceException for the failing call (create_task/start_task)","Verify DataSync task params: subnet ARN, security groups, source/dest locations, and IAM execution role permissions","Confirm the task's AWS credentials are configured and have datasync:* permissions","Retry after transient AWS errors; fix config and re-run for validation errors"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"02eac45a1b6676e639fcbfb4be2243de5771b05d","analyzedAt":"2026-09-06T17:43:00.555Z","contentChangedAt":"2026-09-06T17:43:00.555Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}