{"record":{"id":"aca47a52b43d1d7b","repo":"apache/seatunnel","slug":"flink-job-executed-failed","errorCode":null,"errorMessage":"Flink job executed failed","messagePattern":"Flink job executed failed","errorType":"exception","errorClass":"CommandExecuteException","httpStatus":null,"severity":"error","filePath":"seatunnel-core/seatunnel-flink-starter/seatunnel-flink-starter-common/src/main/java/org/apache/seatunnel/core/starter/flink/command/FlinkTaskExecuteCommand.java","lineNumber":66,"sourceCode":"    @Override\n    public void execute() throws CommandExecuteException {\n        Path configFile = FileUtils.getConfigPath(flinkCommandArgs);\n        checkConfigExist(configFile);\n        Config config =\n                MetalakeConfigUtils.getMetalakeConfig(\n                        ConfigBuilder.of(configFile, flinkCommandArgs.getVariables()));\n        // if user specified job name using command line arguments, override config option\n        if (!flinkCommandArgs.getJobName().equals(Constants.LOGO)) {\n            config =\n                    config.withValue(\n                            ConfigUtil.joinPath(\"env\", \"job.name\"),\n                            ConfigValueFactory.fromAnyRef(flinkCommandArgs.getJobName()));\n        }\n        FlinkExecution seaTunnelTaskExecution = new FlinkExecution(config);\n        try {\n            seaTunnelTaskExecution.execute();\n        } catch (Exception e) {\n            throw new CommandExecuteException(\"Flink job executed failed\", e);\n        }\n    }\n}\n","sourceCodeStart":48,"sourceCodeEnd":70,"githubUrl":"https://github.com/apache/seatunnel/blob/cf67b549a7a6c35fa0beb12d83c62892427ea919/seatunnel-core/seatunnel-flink-starter/seatunnel-flink-starter-common/src/main/java/org/apache/seatunnel/core/starter/flink/command/FlinkTaskExecuteCommand.java#L48-L70","documentation":"CommandExecuteException thrown by FlinkTaskExecuteCommand.execute when FlinkExecution.execute() (building and launching the Flink job) throws any exception. It is a generic wrapper meaning 'the Flink job failed to execute'; the actual cause is attached as the exception cause.","triggerScenarios":"Any failure during FlinkExecution.execute — invalid job config after env merging, Flink pipeline construction errors, plugin initialization failures, cluster submission failures — surfacing as this wrapper in the command layer.","commonSituations":"Unreachable or misconfigured Flink cluster; missing plugin jars on the classpath; invalid env config (parallelism, job name); errors thrown deeper in sink/source processors.","solutions":["Read the full stack trace / cause of the CommandExecuteException for the real failure","Verify the target Flink cluster is reachable and matches the configured master/deploy mode","Validate the job config (env, source, sink sections) and ensure plugin jars are installed in the Flink lib/connector directory"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":"// validate config and cluster before executing\nnew ConfigValidator().validate(config);\nif (!clusterHealthCheck(masterUrl)) {\n    throw new IllegalStateException(\"Flink cluster unreachable\");\n}","typeGuard":null,"tryCatchPattern":"try {\n    command.execute();\n} catch (CommandExecuteException e) {\n    log.error(\"Flink job failed, root cause:\", e.getCause());\n    throw e;\n}","preventionTips":["Always inspect getCause() for the true failure","Verify Flink cluster reachability and versions before submission","Run a small batch job to validate the environment first"],"tags":["flink","job-execution","command"],"backgroundTag":"api-request-failed","analyzedSha":"cf67b549a7a6c35fa0beb12d83c62892427ea919","analyzedAt":"2026-09-10T21:44:55.265Z","contentChangedAt":"2026-09-10T21:44:55.265Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}