apache/dolphinscheduler · error · TaskException

The current DataX task has been interrupted

Error message

The current DataX task has been interrupted

What it means

InterruptedException was caught while the DataX shell command ran — the master or a user killed the running task, interrupting the waiting worker thread. The handler restores the interrupt flag, sets the failure/kill exit code path, and rethrows as TaskException so the task is recorded as interrupted rather than failed with a bogus exit code.

Source

Thrown at dolphinscheduler-task-plugin/dolphinscheduler-task-datax/src/main/java/org/apache/dolphinscheduler/plugin/task/datax/DataxTask.java:150

    @Override
    public void handle(TaskCallBack taskCallBack) throws TaskException {
        try {
            // replace placeholder,and combine local and global parameters
            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) {

View on GitHub (pinned to 02eac45a1b)

Solutions

  1. No fix needed when the kill was intentional — the task is marked killed
  2. If tasks are interrupted spuriously, check worker thread pool shutdown/rebalance events and JVM shutdowns
  3. Ensure the datax process is actually terminated by the cancel path so it does not orphan running processes
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:150 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/db4fb1c6250b9322. Report an issue: GitHub.