apache/dolphinscheduler · error · TaskException

SeaTunnel task params is not valid

Error message

SeaTunnel task params is not valid

What it means

SeatunnelTask.init() throws TaskException("SeaTunnel task params is not valid") when seatunnelParameters is null or checkParameters() fails. checkParameters verifies the startup script and other required SeaTunnel settings, so this means the task definition is incomplete or malformed.

Source

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

    private final ShellCommandExecutor shellCommandExecutor;

    public SeatunnelTask(TaskExecutionContext taskExecutionContext) {
        super(taskExecutionContext);

        this.shellCommandExecutor = new ShellCommandExecutor(taskExecutionContext);
    }

    @Override
    public List<String> getApplicationIds() throws TaskException {
        return Collections.emptyList();
    }

    @Override
    public void init() {
        log.info("Intialize SeaTunnel task params {}", JSONUtils.toPrettyJsonString(seatunnelParameters));
        if (seatunnelParameters == null || !seatunnelParameters.checkParameters()) {
            throw new TaskException("SeaTunnel task params is not valid");
        }
    }

    // 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) {

View on GitHub (pinned to 02eac45a1b)

Solutions

  1. Open the SeaTunnel task in the UI and ensure the startup script (seatunnel.sh/flink/run) and script content are set, then save.
  2. Call checkParameters() on your params offline / read its source to see exactly which field is missing.
  3. Re-create the task definition in the current DS version so new required fields get defaults.
  4. Verify the taskParams JSON stored in the DB deserializes into SeatunnelParameters without nulling fields.

Example fix

// before: startup script missing
{"startupScript":null,"rawScript":"env { ... }"}
// after
{"startupScript":"seatunnel.sh","rawScript":"env { ... }"}
Defensive patterns

Strategy: validation

Validate before calling

SeatunnelParameters sp = JSONUtils.parseObject(taskParams, SeatunnelParameters.class);
if (sp == null || !sp.checkParameters()) {
    throw new IllegalStateException("SeaTunnel params invalid: check startupScript and rawScript");
}

Try / catch

try {
    task.init();
} catch (TaskException e) {
    log.error("SeaTunnel task definition incomplete — re-edit task in UI", e);
}

Prevention

When it happens

Trigger: SeatunnelParameters is null (taskParams JSON didn't deserialize) or checkParameters() returns false — e.g. startup script empty/not one of the supported ones, or no raw script/deployment mode provided depending on the variant.

Common situations: Task form saved with missing startup script, upgrading DolphinScheduler so stored SeaTunnel params lack newly required fields, or copying a task definition between clusters where the plugin expects extra fields.

Understand the failure class

Background: "Invalid value" and "allowed values are" config errors: what your library rejected and how to fix it — this error's family across 41 libraries.

Related errors


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