{"record":{"id":"7be80ccd16f0068b","repo":"apache/dolphinscheduler","slug":"execute-chunjun-task-failed","errorCode":null,"errorMessage":"Execute chunjun task failed","messagePattern":"Execute chunjun task failed","errorType":"exception","errorClass":"TaskException","httpStatus":null,"severity":"error","filePath":"dolphinscheduler-task-plugin/dolphinscheduler-task-chunjun/src/main/java/org/apache/dolphinscheduler/plugin/task/chunjun/ChunJunTask.java","lineNumber":106,"sourceCode":"            IShellInterceptorBuilder<?, ?> shellActuatorBuilder = ShellInterceptorBuilderFactory.newBuilder()\n                    .properties(ParameterUtils.convert(paramsMap))\n                    .appendScript(buildCommand(buildChunJunJsonFile(paramsMap)));\n            TaskResponse commandExecuteResult = shellCommandExecutor.run(shellActuatorBuilder, taskCallBack);\n\n            setExitStatusCode(commandExecuteResult.getExitStatusCode());\n\n            // todo get applicationId\n            setAppIds(String.join(TaskConstants.COMMA, Collections.emptySet()));\n            setProcessId(commandExecuteResult.getProcessId());\n        } catch (InterruptedException e) {\n            Thread.currentThread().interrupt();\n            log.error(\"The current ChunJun Task has been interrupted\", e);\n            setExitStatusCode(EXIT_CODE_FAILURE);\n            throw new TaskException(\"The current ChunJun Task has been interrupted\", e);\n        } catch (Exception e) {\n            log.error(\"chunjun task failed.\", e);\n            setExitStatusCode(EXIT_CODE_FAILURE);\n            throw new TaskException(\"Execute chunjun task failed\", e);\n        }\n    }\n\n    /**\n     * build chunjun json file\n     *\n     * @param paramsMap\n     * @return\n     * @throws Exception\n     */\n    private String buildChunJunJsonFile(Map<String, Property> paramsMap) throws Exception {\n        // generate json\n        String fileName = String.format(\"%s/%s_job.json\", taskRequest.getExecutePath(), taskRequest.getTaskAppId());\n\n        String json = null;\n\n        Path path = new File(fileName).toPath();\n        if (Files.exists(path)) {","sourceCodeStart":88,"sourceCodeEnd":124,"githubUrl":"https://github.com/apache/dolphinscheduler/blob/02eac45a1b6676e639fcbfb4be2243de5771b05d/dolphinscheduler-task-plugin/dolphinscheduler-task-chunjun/src/main/java/org/apache/dolphinscheduler/plugin/task/chunjun/ChunJunTask.java#L88-L124","documentation":"A catch-all in ChunJunTask.handle(): the shell command that launches the chunjun process failed for any reason other than interruption — process non-zero exit, missing chunjun installation/home, invalid generated JSON config, or an I/O error from ShellCommandExecutor. The exception's exit code is captured before rethrow, so the task is marked failed with its real process exit status.","triggerScenarios":"Thrown at dolphinscheduler-task-plugin/dolphinscheduler-task-chunjun/src/main/java/org/apache/dolphinscheduler/plugin/task/chunjun/ChunJunTask.java:106 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Check the task log for the underlying shell output — the chunjun CLI usually prints the concrete failure","Verify CHUNJUN_HOME and the chunjun binary are present and executable on the worker","Inspect the generated chunjun json file (logged by buildChunJunJsonFile) for datasource/field mapping errors","Fix datasource connectivity or credentials referenced by the json config"],"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"}