{"record":{"id":"149a9ab93f5e55a6","repo":"apache/seatunnel","slug":"job-id-s-init-failed","errorCode":null,"errorMessage":"Job id %s init failed","messagePattern":"Job id (.+?) init failed","errorType":"exception","errorClass":"SeaTunnelEngineException","httpStatus":null,"severity":"error","filePath":"seatunnel-engine/seatunnel-engine-server/src/main/java/org/apache/seatunnel/engine/server/CoordinatorService.java","lineNumber":1154,"sourceCode":"        JobMaster jobMaster =\n                new JobMaster(\n                        jobId,\n                        jobInfo.getJobImmutableInformation(),\n                        nodeEngine,\n                        MDCTracer.tracing(jobId, executorService),\n                        getResourceManager(),\n                        getJobHistoryService(),\n                        runningJobStateIMap,\n                        runningJobStateTimestampsIMap,\n                        ownedSlotProfilesIMap,\n                        runningJobInfoIMap,\n                        engineConfig,\n                        seaTunnelServer);\n\n        try {\n            jobMaster.init(jobInfo.getInitializationTimestamp(), true);\n        } catch (Exception e) {\n            throw new SeaTunnelEngineException(String.format(\"Job id %s init failed\", jobId), e);\n        }\n\n        PendingJobInfo pendingJobInfo = new PendingJobInfo(PendingSourceState.RESTORE, jobMaster);\n        try {\n            pendingJobQueue.put(pendingJobInfo);\n        } catch (InterruptedException e) {\n            Thread.currentThread().interrupt();\n            throw new SeaTunnelEngineException(\n                    String.format(\n                            \"Job id %s restore interrupted while entering pending queue\", jobId),\n                    e);\n        }\n        jobMaster.getPhysicalPlan().updateJobState(JobStatus.PENDING);\n        logger.info(String.format(\"The restore job enter pending queue, JobId: %s\", jobId));\n    }\n\n    private void cleanupTerminalZombieJob(long jobId, JobInfo jobInfo, JobStatus finalStatus) {\n        JobImmutableInformation jobImmutableInformation = restoreJobImmutableInformation(jobInfo);","sourceCodeStart":1136,"sourceCodeEnd":1172,"githubUrl":"https://github.com/apache/seatunnel/blob/cf67b549a7a6c35fa0beb12d83c62892427ea919/seatunnel-engine/seatunnel-engine-server/src/main/java/org/apache/seatunnel/engine/server/CoordinatorService.java#L1136-L1172","documentation":"After recreating the JobMaster for a restored job, restoreJobFromMasterActiveSwitch() calls jobMaster.init(timestamp, true) to initialize the job in restart mode. Any exception from init (failed to load job state, recompute coordinator, restore checkpoint metadata, etc.) is wrapped in SeaTunnelEngineException 'Job id %s init failed', aborting that job's restore.","triggerScenarios":"Calling jobMaster.init(..., true) during post-failover restore when checkpoint/state storage is unreadable, the job DAG/IMap metadata is inconsistent, plugin jars are missing, or coordinator initialization (e.g. CheckpointManager, LatestAppVersionAndJobStatisticManager) throws.","commonSituations":"Checkpoint storage (HDFS/S3/OSS) unreachable or credentials expired after failover; connector plugin jar missing on the new master node; corrupted or partially deleted IMap state; incompatible plugin versions after an upgrade.","solutions":["Inspect the wrapped cause for the actual init failure (storage IO, missing class, config error) and fix that dependency","Verify checkpoint/state storage is reachable and credentials are valid from the new master node","Ensure all plugin jars (connectors/transforms) exist in the new master's plugin directory and match the original job's versions","Restart the node or resubmit the job to rerun restore after fixing the root cause","Check version consistency: job was submitted with a different SeaTunnel/plugin version than the restored master"],"exampleFix":"// before\ntry {\n    jobMaster.init(jobInfo.getInitializationTimestamp(), true);\n} catch (Exception e) {\n    throw new SeaTunnelEngineException(String.format(\"Job id %s init failed\", jobId), e);\n}\n// after\ntry {\n    jobMaster.init(jobInfo.getInitializationTimestamp(), true);\n} catch (Exception e) {\n    logger.severe(\"Job init failed, cleaning zombie job \" + jobId + \": \"\n            + ExceptionUtils.getMessage(e));\n    throw new SeaTunnelEngineException(String.format(\"Job id %s init failed\", jobId), e);\n} // fix underlying cause (storage access, missing plugin jars) before retrying restore","handlingStrategy":"try-catch","validationCode":"// before node activation, verify checkpoint storage and plugin dirs\nassertFsAccessible(checkpointStorageConfig);\nassertPluginsInstalled(expectedConnectorJars); // jars present in <seatunnel_home>/connectors","typeGuard":null,"tryCatchPattern":"try {\n    restoreJob(jobId, jobInfo);\n} catch (SeaTunnelEngineException e\n        && e.getMessage().matches(\"Job id \\\\d+ init failed\")) {\n    logger.severe(\"JobMaster init failed for \" + jobId + \", root cause: \" + e.getCause());\n    // fix storage/plugin root cause, then resubmit or rerun restore\n}","preventionTips":["Validate checkpoint storage connectivity and credentials from every node, not only the old master","Keep plugin jar directories identical across all cluster nodes","Avoid upgrading SeaTunnel/plugin versions mid-cluster without full job resubmission","Test failover (kill master) in staging to surface init-time dependency issues"],"tags":["job-master","init-failure","failover","checkpoint-storage","zeta-engine"],"backgroundTag":"module-init-failed","analyzedSha":"cf67b549a7a6c35fa0beb12d83c62892427ea919","analyzedAt":"2026-09-10T21:44:55.265Z","contentChangedAt":"2026-09-10T21:44:55.265Z","schemaVersion":2},"datasetVersion":"2026-09-14T11:17:12.474Z"}