{"record":{"id":"e27552945f5c0eb1","repo":"apache/seatunnel","slug":"seatunnel-job-executed-failed","errorCode":null,"errorMessage":"SeaTunnel job executed failed","messagePattern":"SeaTunnel job executed failed","errorType":"exception","errorClass":"CommandExecuteException","httpStatus":null,"severity":"critical","filePath":"seatunnel-core/seatunnel-starter/src/main/java/org/apache/seatunnel/core/starter/seatunnel/command/ClientExecuteCommand.java","lineNumber":291,"sourceCode":"                    executorService.schedule(\n                            new JobStatusRunner(engineClient.getJobClient(), jobId),\n                            0,\n                            TimeUnit.SECONDS);\n                }\n                // wait for job complete\n                JobResult jobResult = clientJobProxy.waitForJobCompleteV2();\n                jobStatus = jobResult.getStatus();\n                if (StringUtils.isNotEmpty(jobResult.getError())\n                        || jobResult.getStatus().equals(JobStatus.FAILED)) {\n                    throw new SeaTunnelEngineException(jobResult.getError());\n                }\n                // get job end time\n                endTime = LocalDateTime.now();\n                // get job statistic information when job finished\n                jobMetricsSummary = engineClient.getJobMetricsSummary(jobId);\n            }\n        } catch (Exception e) {\n            throw new CommandExecuteException(\"SeaTunnel job executed failed\", e);\n        } finally {\n            if (jobMetricsSummary != null) {\n                // print job statistics information when job finished\n                log.info(\n                        StringFormatUtils.formatTable(\n                                \"Job Statistic Information\",\n                                \"Start Time\",\n                                DateTimeUtils.toString(\n                                        startTime, DateTimeUtils.Formatter.YYYY_MM_DD_HH_MM_SS),\n                                \"End Time\",\n                                DateTimeUtils.toString(\n                                        endTime, DateTimeUtils.Formatter.YYYY_MM_DD_HH_MM_SS),\n                                \"Total Time(s)\",\n                                Duration.between(startTime, endTime).getSeconds(),\n                                \"Total Read Count\",\n                                jobMetricsSummary.getSourceReadCount(),\n                                \"Total Write Count\",\n                                jobMetricsSummary.getSinkWriteCount(),","sourceCodeStart":273,"sourceCodeEnd":309,"githubUrl":"https://github.com/apache/seatunnel/blob/cf67b549a7a6c35fa0beb12d83c62892427ea919/seatunnel-core/seatunnel-starter/src/main/java/org/apache/seatunnel/core/starter/seatunnel/command/ClientExecuteCommand.java#L273-L309","documentation":"ClientExecuteCommand.execute wraps its whole job-submission/wait logic in a try-catch and rethrows any Exception as CommandExecuteException('SeaTunnel job executed failed', e). It is a generic client-side wrapper: the original cause (network error, engine exception like 2562, serialization problem, client shutdown) is attached as the cause. Job statistics gathered so far are still logged in the finally block.","triggerScenarios":"Any exception during execute: job submission fails, the REST/cluster client cannot reach the master node, waitForJobCompleteV2 throws, getJobMetricsSummary fails, or the SeaTunnelEngineException from a failed job propagates through this catch.","commonSituations":"Engine not running or wrong cluster address in the client config; job failed for connector reasons (see nested cause); interrupted client; version mismatch between client and cluster.","solutions":["Inspect the nested cause (getCause / printed stack trace) to find the real failure.","Verify the engine cluster is reachable and the cluster address in the client config (seatunnel.yaml / -m settings) is correct.","Fix the underlying connector/config issue indicated by the cause, then resubmit.","Ensure client and engine versions match."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":"// check cluster reachability before submitting\n// curl http://<master>:5801/hazelcast/rest/state or verify seatunnel.yaml cluster settings","typeGuard":null,"tryCatchPattern":"try { client.execute(); } catch (CommandExecuteException e) { Throwable root = e; while (root.getCause() != null) root = root.getCause(); log.error(\"Job execution failed, root cause: \", root); }","preventionTips":["Always inspect the cause chain — this exception is only a wrapper","Confirm the engine cluster is up and the address in the client config is correct","Keep client and engine versions aligned","Dry-run configs before submission to catch config-level causes early"],"tags":["job-execution","command-execution","wrapper-exception"],"backgroundTag":"job-execution-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"}