{"record":{"id":"e8a5985399ed99f9","repo":"apache/dolphinscheduler","slug":"execute-seatunnel-task-failed","errorCode":null,"errorMessage":"Execute Seatunnel task failed","messagePattern":"Execute Seatunnel task failed","errorType":"exception","errorClass":"TaskException","httpStatus":null,"severity":"error","filePath":"dolphinscheduler-task-plugin/dolphinscheduler-task-seatunnel/src/main/java/org/apache/dolphinscheduler/plugin/task/seatunnel/SeatunnelTask.java","lineNumber":106,"sourceCode":"            // construct process\n            String command = buildCommand();\n            IShellInterceptorBuilder<?, ?> shellActuatorBuilder = ShellInterceptorBuilderFactory.newBuilder()\n                    .appendScript(command);\n\n            TaskResponse commandExecuteResult = shellCommandExecutor.run(shellActuatorBuilder, taskCallBack);\n            setExitStatusCode(commandExecuteResult.getExitStatusCode());\n            setAppIds(String.join(TaskConstants.COMMA, getApplicationIds()));\n            setProcessId(commandExecuteResult.getProcessId());\n            seatunnelParameters.dealOutParam(shellCommandExecutor.getTaskOutputParams());\n        } catch (InterruptedException e) {\n            Thread.currentThread().interrupt();\n            log.error(\"The current SeaTunnel task has been interrupted\", e);\n            setExitStatusCode(EXIT_CODE_FAILURE);\n            throw new TaskException(\"The current SeaTunnel task has been interrupted\", e);\n        } catch (Exception e) {\n            log.error(\"SeaTunnel task error\", e);\n            setExitStatusCode(EXIT_CODE_FAILURE);\n            throw new TaskException(\"Execute Seatunnel task failed\", e);\n        }\n    }\n\n    @Override\n    public void submitApplication() throws TaskException {\n\n    }\n\n    @Override\n    public void trackApplicationStatus() throws TaskException {\n\n    }\n\n    @Override\n    public void cancelApplication() throws TaskException {\n        // cancel process\n        try {\n            shellCommandExecutor.cancelApplication();","sourceCodeStart":88,"sourceCodeEnd":124,"githubUrl":"https://github.com/apache/dolphinscheduler/blob/02eac45a1b6676e639fcbfb4be2243de5771b05d/dolphinscheduler-task-plugin/dolphinscheduler-task-seatunnel/src/main/java/org/apache/dolphinscheduler/plugin/task/seatunnel/SeatunnelTask.java#L88-L124","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","solutions":["Read the chained cause and task instance logs — they show the SeaTunnel process output and exit code.","Verify SeaTunnel is installed on worker nodes and the startup script path is correct (SEATUNNEL_HOME, PATH).","Run the generated SeaTunnel command manually on the worker to reproduce the failure.","Fix script/config errors in the task definition (env/source/transform/sink blocks).","Confirm the resource files listed in the task exist and are uploaded."],"exampleFix":"// before\n{\"startupScript\":\"flink\"} // flink cluster absent on worker\n// after\n{\"startupScript\":\"seatunnel.sh\"} // use bundled Zeta engine","handlingStrategy":"try-catch","validationCode":"// on worker, before scheduling\nassert new File(System.getenv(\"SEATUNNEL_HOME\"), \"bin/seatunnel.sh\").exists() : \"SeaTunnel binary missing\";","typeGuard":null,"tryCatchPattern":"try {\n    task.handle(callback);\n} catch (TaskException e) {\n    log.error(\"Execute Seatunnel task failed; cause: {}\", e.getCause(), e);\n    // route to ops: check SEATUNNEL_HOME, java, and task logs for process output\n}","preventionTips":["Install SeaTunnel on all worker nodes and set SEATUNNEL_HOME/JAVA_HOME","Run the generated command manually on the worker to smoke-test","Keep task resource files uploaded and paths valid","Review SeaTunnel stdout/stderr in the task instance log for the root exit reason"],"tags":["seatunnel","shell-execution","process"],"backgroundTag":"command-execution-failed","analyzedSha":"02eac45a1b6676e639fcbfb4be2243de5771b05d","analyzedAt":"2026-09-06T17:43:00.555Z","contentChangedAt":"2026-09-06T17:43:00.555Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}