apache/dolphinscheduler · error · TaskException

Execute Seatunnel task failed

Error message

Execute Seatunnel task failed

What it means

SeatunnelTask.handle()'s generic catch converts any non-interrupt failure — process launch failure, non-zero exit, command build error — into TaskException("Execute Seatunnel task failed", e) with exit code failure. The real cause is always attached, so this message alone just means the SeaTunnel shell execution failed somewhere.

Source

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

            // 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
    public void cancelApplication() throws TaskException {
        // cancel process
        try {
            shellCommandExecutor.cancelApplication();

View on GitHub (pinned to 02eac45a1b)

Solutions

  1. Read the chained cause and task instance logs — they show the SeaTunnel process output and exit code.
  2. Verify SeaTunnel is installed on worker nodes and the startup script path is correct (SEATUNNEL_HOME, PATH).
  3. Run the generated SeaTunnel command manually on the worker to reproduce the failure.
  4. Fix script/config errors in the task definition (env/source/transform/sink blocks).
  5. Confirm the resource files listed in the task exist and are uploaded.

Example fix

// before
{"startupScript":"flink"} // flink cluster absent on worker
// after
{"startupScript":"seatunnel.sh"} // use bundled Zeta engine
Defensive patterns

Strategy: try-catch

Validate before calling

// on worker, before scheduling
assert new File(System.getenv("SEATUNNEL_HOME"), "bin/seatunnel.sh").exists() : "SeaTunnel binary missing";

Try / catch

try {
    task.handle(callback);
} catch (TaskException e) {
    log.error("Execute Seatunnel task failed; cause: {}", e.getCause(), e);
    // route to ops: check SEATUNNEL_HOME, java, and task logs for process output
}

Prevention

When it happens

Trigger: Any Exception other than InterruptedException in handle(): buildCommand() fails (bad plugin/mode args), the SeaTunnel process cannot start (binary not found, JAVA_HOME unset), or the job exits non-zero.

Common situations: SeaTunnel not installed or wrong SEATUNNEL_HOME on workers, incompatible startup script (using flink script without a Flink cluster), syntax error in the SeaTunnel config script, out-of-memory job failure.

Related errors


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