{"record":{"id":"f88387a2ce85bf8a","repo":"apache/dolphinscheduler","slug":"execute-datax-task-failed","errorCode":null,"errorMessage":"Execute DataX task failed","messagePattern":"Execute DataX task failed","errorType":"exception","errorClass":"TaskException","httpStatus":null,"severity":"error","filePath":"dolphinscheduler-task-plugin/dolphinscheduler-task-datax/src/main/java/org/apache/dolphinscheduler/plugin/task/datax/DataxTask.java","lineNumber":154,"sourceCode":"            Map<String, Property> paramsMap = taskRequest.getPrepareParamsMap();\n\n            IShellInterceptorBuilder<?, ?> shellActuatorBuilder = ShellInterceptorBuilderFactory.newBuilder()\n                    .properties(ParameterUtils.convert(paramsMap))\n                    .appendScript(buildCommand(buildDataxJsonFile(paramsMap), paramsMap));\n\n            TaskResponse commandExecuteResult = shellCommandExecutor.run(shellActuatorBuilder, taskCallBack);\n\n            setExitStatusCode(commandExecuteResult.getExitStatusCode());\n            setProcessId(commandExecuteResult.getProcessId());\n        } catch (InterruptedException e) {\n            Thread.currentThread().interrupt();\n            log.error(\"The current DataX task has been interrupted\", e);\n            setExitStatusCode(EXIT_CODE_FAILURE);\n            throw new TaskException(\"The current DataX task has been interrupted\", e);\n        } catch (Exception e) {\n            log.error(\"datax task error\", e);\n            setExitStatusCode(EXIT_CODE_FAILURE);\n            throw new TaskException(\"Execute DataX task failed\", e);\n        }\n    }\n\n    /**\n     * cancel DataX process\n     *\n     * @throws TaskException if error throws Exception\n     */\n    @Override\n    public void cancel() throws TaskException {\n        // cancel process\n        try {\n            shellCommandExecutor.cancelApplication();\n        } catch (Exception e) {\n            throw new TaskException(\"cancel application error\", e);\n        }\n    }\n","sourceCodeStart":136,"sourceCodeEnd":172,"githubUrl":"https://github.com/apache/dolphinscheduler/blob/02eac45a1b6676e639fcbfb4be2243de5771b05d/dolphinscheduler-task-plugin/dolphinscheduler-task-datax/src/main/java/org/apache/dolphinscheduler/plugin/task/datax/DataxTask.java#L136-L172","documentation":"A catch-all in DataxTask.handle for non-interrupt failures: the datax process exited non-zero, the generated JSON config is invalid (datax itself rejects the reader/writer config), required plugins are missing, or an I/O error occurred in ShellCommandExecutor. The process exit code was already captured via setExitStatusCode before rethrow.","triggerScenarios":"Thrown at dolphinscheduler-task-plugin/dolphinscheduler-task-datax/src/main/java/org/apache/dolphinscheduler/plugin/task/datax/DataxTask.java:154 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Read the task instance log for the datax process stderr — it pinpoints the failing reader/writer or connectivity issue","Validate the generated datax json (buildDataxJsonFile) — check column mappings, datasource credentials, and splitPk","Verify DATAX_HOME and the datax plugin tarball are installed on the worker","Fix datasource connectivity and re-run"],"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"}