{"record":{"id":"f04d7ceccfa900d4","repo":"apache/dolphinscheduler","slug":"datasync-taskexecarn-is-null-not-created-yet","errorCode":null,"errorMessage":"datasync taskExecArn is null, not created yet","messagePattern":"datasync taskExecArn is null, not created yet","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":140,"sourceCode":"    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;\n        } else {\n            exitStatusCode = TaskConstants.EXIT_CODE_SUCCESS;\n        }\n    }\n\n    /**\n     * check datasync applicationId or get it from appId\n     */\n    private void checkApplicationId() {\n        String taskExecArn = hook.getTaskExecArn();\n        if (StringUtils.isEmpty(taskExecArn)) {\n            if (StringUtils.isEmpty(getAppIds())) {\n                throw new TaskException(\"datasync taskExecArn is null, not created yet\");\n            }\n            hook.setTaskExecArn(getAppIds());\n        }\n    }\n\n    public int checkCreateTask() {\n\n        Boolean isCreateSuccessfully = hook.createDatasyncTask(parameters);\n        if (!isCreateSuccessfully) {\n            return TaskConstants.EXIT_CODE_FAILURE;\n        } else {\n            return TaskConstants.EXIT_CODE_SUCCESS;\n        }\n    }\n\n    public int startDatasyncTask() {\n        Boolean isStartSuccessfully = hook.startDatasyncTask();\n        if (!isStartSuccessfully) {","sourceCodeStart":122,"sourceCodeEnd":158,"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#L122-L158","documentation":"A state guard in checkApplicationId: hook's taskExecArn is null/empty, meaning the AWS DataSync task execution was never created (submission failed or was not completed before status tracking/cancel). Since there is no execution ARN, doubleCheckFinishStatus or cancellation has nothing to query; the faulty state is the missing ARN in DatasyncHook.","triggerScenarios":"Thrown at dolphinscheduler-task-plugin/dolphinscheduler-task-datasync/src/main/java/org/apache/dolphinscheduler/plugin/task/datasync/DatasyncTask.java:140 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Check submitApplication logs for why the task execution ARN was never captured","Ensure status tracking is only started after successful submission","Re-run the task to create a new DataSync execution"],"exampleFix":null,"handlingStrategy":"validation","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-14T05:17:10.506Z"}