apache/seatunnel · error · SeaTunnelEngineException
Job id %s init failed
Error message
Job id %s init failed
What it means
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.
Source
Thrown at seatunnel-engine/seatunnel-engine-server/src/main/java/org/apache/seatunnel/engine/server/CoordinatorService.java:1154
JobMaster jobMaster =
new JobMaster(
jobId,
jobInfo.getJobImmutableInformation(),
nodeEngine,
MDCTracer.tracing(jobId, executorService),
getResourceManager(),
getJobHistoryService(),
runningJobStateIMap,
runningJobStateTimestampsIMap,
ownedSlotProfilesIMap,
runningJobInfoIMap,
engineConfig,
seaTunnelServer);
try {
jobMaster.init(jobInfo.getInitializationTimestamp(), true);
} catch (Exception e) {
throw new SeaTunnelEngineException(String.format("Job id %s init failed", jobId), e);
}
PendingJobInfo pendingJobInfo = new PendingJobInfo(PendingSourceState.RESTORE, jobMaster);
try {
pendingJobQueue.put(pendingJobInfo);
} catch (InterruptedException e) {
Thread.currentThread().interrupt();
throw new SeaTunnelEngineException(
String.format(
"Job id %s restore interrupted while entering pending queue", jobId),
e);
}
jobMaster.getPhysicalPlan().updateJobState(JobStatus.PENDING);
logger.info(String.format("The restore job enter pending queue, JobId: %s", jobId));
}
private void cleanupTerminalZombieJob(long jobId, JobInfo jobInfo, JobStatus finalStatus) {
JobImmutableInformation jobImmutableInformation = restoreJobImmutableInformation(jobInfo);View on GitHub (pinned to cf67b549a7)
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
Example fix
// before
try {
jobMaster.init(jobInfo.getInitializationTimestamp(), true);
} catch (Exception e) {
throw new SeaTunnelEngineException(String.format("Job id %s init failed", jobId), e);
}
// after
try {
jobMaster.init(jobInfo.getInitializationTimestamp(), true);
} catch (Exception e) {
logger.severe("Job init failed, cleaning zombie job " + jobId + ": "
+ ExceptionUtils.getMessage(e));
throw new SeaTunnelEngineException(String.format("Job id %s init failed", jobId), e);
} // fix underlying cause (storage access, missing plugin jars) before retrying restore Defensive patterns
Strategy: try-catch
Validate before calling
// before node activation, verify checkpoint storage and plugin dirs assertFsAccessible(checkpointStorageConfig); assertPluginsInstalled(expectedConnectorJars); // jars present in <seatunnel_home>/connectors
Try / catch
try {
restoreJob(jobId, jobInfo);
} catch (SeaTunnelEngineException e
&& e.getMessage().matches("Job id \\d+ init failed")) {
logger.severe("JobMaster init failed for " + jobId + ", root cause: " + e.getCause());
// fix storage/plugin root cause, then resubmit or rerun restore
} Prevention
- 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
When it happens
Trigger: 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.
Common situations: 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.
Related errors
- Failed to fetch running jobs from IMap during master switch
- wait worker register error
- Job id %s restore failed, can not get job state
- Job id %s restore interrupted while entering pending queue
- Job %s not running (restore in progress)
AI-assisted analysis of apache/seatunnel@cf67b549a7 (2026-09-10).
Data as JSON: /api/errors/149a9ab93f5e55a6.
Report an issue: GitHub.