apache/seatunnel · error · SeaTunnelEngineException
failed to fetch job result
Error message
failed to fetch job result
What it means
ClientJobProxy.waitForJobCompleteV2 polls the Zeta master for the final job result using RetryUtils (100000 attempts, retrying only on operation-need-retry exceptions). If the retried fetch still returns null, it throws SeaTunnelEngineException("failed to fetch job result"), i.e. the master never produced a terminal state for the job.
Solutions
- Check Zeta master logs and cluster stability for the job's lifetime.
- Raise historyJobExpireMinutes / state cleanup delay so results outlive slow clients.
- Verify client-to-master connectivity and retry jobResult after the connection recovers.
- Fetch the result/status from job history or persistent storage if the job already finished.
Example fix
// before
JobResult r = jobProxy.waitForJobCompleteV2(); // may throw
// after
JobResult r;
try {
r = jobProxy.waitForJobCompleteV2();
} catch (SeaTunnelEngineException e) {
LOG.warning("job result unavailable from master: " + e.getMessage());
r = fetchResultFromHistory(jobId);
} Defensive patterns
Strategy: try-catch
Validate before calling
if (!clusterHealthy()) {
throw new IllegalStateException("master unavailable; refusing to block on job result");
} Try / catch
try {
JobResult r = jobProxy.waitForJobCompleteV2();
} catch (SeaTunnelEngineException e) {
LOGGER.warning("job " + jobId + " result unavailable: " + e.getMessage());
// check master state / history, then decide retry vs fail
} Prevention
- Keep master stable and reachable for the full job duration.
- Set historyJobExpireMinutes / state cleanup long enough to outlive slow clients.
- Persist job results externally for long-lived access.
- Monitor master restarts and client-master connectivity.
When it happens
Trigger: jobResult() -> waitForJobCompleteV2 where the retried fetch returns null or a non-retryable exception is caught: master restarted/crashed mid-job, job state expired and cleaned up, sustained client-master connection failures, or the jobId never existed on this cluster.
Common situations: Zeta master restart during a long job; historyJobExpireMinutes / state cleanup too small so the job record vanishes before the client asks; network instability exhausting retries; client pointed at the wrong cluster.
Understand the failure class
Background: "invalid response format", "malformed payload", "missing data field": when an API returns 200 but the response shape is wrong — this error's family across 23 libraries.
Related errors
- Checkpoint storage is unavailable
- ${jobResult.error}
- SeaTunnel job on st-engine submitted target only support…
- SeaTunnel server is not available on this node.
- must be >= 0
AI-assisted analysis of apache/seatunnel@cf67b549a7 (2026-09-10).
Data as JSON: /api/errors/3ab8fa91fa5e524c.
Report an issue: GitHub.
Appendix: source
Thrown at seatunnel-engine/seatunnel-engine-client/src/main/java/org/apache/seatunnel/engine/client/job/ClientJobProxy.java:108
* @return The job final status
*/
@Override
public JobResult waitForJobCompleteV2() {
try {
jobResult =
RetryUtils.retryWithException(
() -> {
PassiveCompletableFuture<JobResult> jobFuture =
doWaitForJobComplete();
return jobFuture.get();
},
new RetryUtils.RetryMaterial(
100000,
true,
ExceptionUtil::isOperationNeedRetryException,
Constant.OPERATION_RETRY_SLEEP));
if (jobResult == null) {
throw new SeaTunnelEngineException("failed to fetch job result");
}
} catch (Exception e) {
LOGGER.severe(
String.format(
"Job (%s) end with unknown state, and throw Exception: %s",
jobId, ExceptionUtils.getMessage(e)));
throw new RuntimeException(e);
}
LOGGER.info(String.format("Job (%s) end with state %s", jobId, jobResult.getStatus()));
return jobResult;
}
public JobResult getJobResultCache() {
return jobResult;
}
@Override
public PassiveCompletableFuture<JobResult> doWaitForJobComplete() {View on GitHub (pinned to cf67b549a7)