apache/dolphinscheduler · warning · TaskException

The current SeaTunnel task has been interrupted

Error message

The current SeaTunnel task has been interrupted

What it means

SeatunnelTask.handle() runs the SeaTunnel job through ShellCommandExecutor; if the worker thread is interrupted while waiting on the process, it restores the interrupt flag, sets exit code failure, and throws TaskException("The current SeaTunnel task has been interrupted"). It signals the task was cancelled or the worker is shutting down, not a SeaTunnel job defect.

Source

Thrown at dolphinscheduler-task-plugin/dolphinscheduler-task-seatunnel/src/main/java/org/apache/dolphinscheduler/plugin/task/seatunnel/SeatunnelTask.java:102

    // todo split handle to submit and track
    @Override
    public void handle(TaskCallBack taskCallBack) throws TaskException {
        try {
            // construct process
            String command = buildCommand();
            IShellInterceptorBuilder<?, ?> shellActuatorBuilder = ShellInterceptorBuilderFactory.newBuilder()
                    .appendScript(command);

            TaskResponse commandExecuteResult = shellCommandExecutor.run(shellActuatorBuilder, taskCallBack);
            setExitStatusCode(commandExecuteResult.getExitStatusCode());
            setAppIds(String.join(TaskConstants.COMMA, getApplicationIds()));
            setProcessId(commandExecuteResult.getProcessId());
            seatunnelParameters.dealOutParam(shellCommandExecutor.getTaskOutputParams());
        } catch (InterruptedException e) {
            Thread.currentThread().interrupt();
            log.error("The current SeaTunnel task has been interrupted", e);
            setExitStatusCode(EXIT_CODE_FAILURE);
            throw new TaskException("The current SeaTunnel task has been interrupted", e);
        } catch (Exception e) {
            log.error("SeaTunnel task error", e);
            setExitStatusCode(EXIT_CODE_FAILURE);
            throw new TaskException("Execute Seatunnel task failed", e);
        }
    }

    @Override
    public void submitApplication() throws TaskException {

    }

    @Override
    public void trackApplicationStatus() throws TaskException {

    }

    @Override

View on GitHub (pinned to 02eac45a1b)

Solutions

  1. This is an expected cancellation path: verify whether the task was intentionally killed; if so, no fix needed.
  2. Check the chained cause for who interrupted; worker shutdown logs will confirm maintenance.
  3. Re-run the task once the worker is back up; SeaTunnel jobs are not resumed automatically.
  4. If kills happen unexpectedly, check master-worker connectivity and timeout settings in the workflow definition.
Defensive patterns

Strategy: try-catch

Try / catch

try {
    task.handle(callback);
} catch (TaskException e) {
    if (e.getMessage().contains("interrupted")) {
        Thread.interrupted(); // already re-set; treat as cancellation, not failure
        log.info("SeaTunnel task cancelled by user or worker shutdown");
    } else throw e;
}

Prevention

When it happens

Trigger: InterruptedException caught around shellCommandExecutor.run / command execution — user clicks Kill, master sends a cancel signal, or the worker is gracefully shutting down and interrupts running task threads.

Common situations: Long-running SeaTunnel jobs killed from the UI, worker maintenance/stop while jobs are running, task timeout triggering cancellation.

Related errors


AI-assisted analysis of apache/dolphinscheduler@02eac45a1b (2026-09-06). Data as JSON: /api/errors/eb35e247f5aa7112. Report an issue: GitHub.