apache/dolphinscheduler · error · TaskException
Execute DataX task failed
Error message
Execute DataX task failed
What it means
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.
Source
Thrown at dolphinscheduler-task-plugin/dolphinscheduler-task-datax/src/main/java/org/apache/dolphinscheduler/plugin/task/datax/DataxTask.java:154
Map<String, Property> paramsMap = taskRequest.getPrepareParamsMap();
IShellInterceptorBuilder<?, ?> shellActuatorBuilder = ShellInterceptorBuilderFactory.newBuilder()
.properties(ParameterUtils.convert(paramsMap))
.appendScript(buildCommand(buildDataxJsonFile(paramsMap), paramsMap));
TaskResponse commandExecuteResult = shellCommandExecutor.run(shellActuatorBuilder, taskCallBack);
setExitStatusCode(commandExecuteResult.getExitStatusCode());
setProcessId(commandExecuteResult.getProcessId());
} catch (InterruptedException e) {
Thread.currentThread().interrupt();
log.error("The current DataX task has been interrupted", e);
setExitStatusCode(EXIT_CODE_FAILURE);
throw new TaskException("The current DataX task has been interrupted", e);
} catch (Exception e) {
log.error("datax task error", e);
setExitStatusCode(EXIT_CODE_FAILURE);
throw new TaskException("Execute DataX task failed", e);
}
}
/**
* cancel DataX process
*
* @throws TaskException if error throws Exception
*/
@Override
public void cancel() throws TaskException {
// cancel process
try {
shellCommandExecutor.cancelApplication();
} catch (Exception e) {
throw new TaskException("cancel application error", e);
}
}
View on GitHub (pinned to 02eac45a1b)
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
Defensive patterns
Strategy: try-catch
When it happens
Trigger: 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.
Common situations: See trigger scenarios.
AI-assisted analysis of apache/dolphinscheduler@02eac45a1b (2026-09-06).
Data as JSON: /api/errors/f88387a2ce85bf8a.
Report an issue: GitHub.