apache/flink · error · CompletionException
{savepointInfo.getFailureCause()}
Error message
{savepointInfo.getFailureCause()} What it means
Thrown when a savepoint operation completes but the JobManager reports a non-null failure cause in the SavepointInfo response. After triggering a savepoint via REST and polling its status, if the savepoint failed on the server side (e.g., target directory not writable, job cancelled before savepoint completed), the stored Throwable is rethrown.
Source
Thrown at flink-clients/src/main/java/org/apache/flink/client/program/rest/RestClusterClient.java:688
// we just return the savepoint trigger id in detached savepoint,
// that means the client could exit immediately
futureResult =
responseFuture.thenApply((TriggerResponse tr) -> tr.getTriggerId().toString());
} else {
// otherwise we need to wait the savepoint to be succeeded
// and return the savepoint path
futureResult =
responseFuture
.thenCompose(
savepointTriggerResponseBody -> {
final TriggerId savepointTriggerId =
savepointTriggerResponseBody.getTriggerId();
return pollSavepointAsync(jobId, savepointTriggerId);
})
.thenApply(
savepointInfo -> {
if (savepointInfo.getFailureCause() != null) {
throw new CompletionException(
savepointInfo.getFailureCause());
}
return savepointInfo.getLocation();
});
}
return futureResult;
}
@Override
public CompletableFuture<Map<String, Object>> getAccumulators(JobID jobID, ClassLoader loader) {
final JobAccumulatorsHeaders accumulatorsHeaders = JobAccumulatorsHeaders.getInstance();
final JobAccumulatorsMessageParameters accMsgParams =
accumulatorsHeaders.getUnresolvedMessageParameters();
accMsgParams.jobPathParameter.resolve(jobID);
accMsgParams.includeSerializedAccumulatorsParameter.resolve(
Collections.singletonList(true));
View on GitHub (pinned to 2f3c205e92)
Solutions
- Read the savepointInfo.getFailureCause() message for the exact server-side error.
- Verify the savepoint directory exists and is writable by the JobManager process.
- If the job was cancelled concurrently, retry the savepoint on a running job.
- For S3/HDFS targets, confirm credentials and permissions in the cluster configuration.
Defensive patterns
Strategy: try-catch
Try / catch
try {
String savepointPath = client.triggerSavepoint(jobId, savepointDir, false, formatType, false).get();
} catch (ExecutionException e) {
Throwable cause = ExceptionUtils.stripExecutionException(e);
// cause is savepointInfo.getFailureCause() — the server-side savepoint error
log.error("Savepoint failed: {}", cause.getMessage());
} Prevention
- Pre-create and verify the savepoint target directory.
- Ensure S3/HDFS credentials and permissions are configured on the cluster.
- Do not cancel the job concurrently with a savepoint trigger.
When it happens
Trigger: Calling triggerSavepoint or stopWithSavepoint when the savepoint cannot complete: the savepoint directory does not exist or is not writable; the job is cancelled or fails before the savepoint finishes; the state backend encounters an error during snapshot.
Common situations: Savepoint target directory (state.savepoints.dir) is misconfigured or points to an inaccessible HDFS/S3 path; job finishes or is cancelled concurrently with the savepoint trigger; storage quota exceeded.
Related errors
- {asynchronousOperationInfo.getFailureCause()}
- {checkpointInfo.getFailureCause()}
- Failed to serialize ExecutionPlan.
- Failed to get the FileSystem of artifact {artifactFilePath}.
- Failed to submit ExecutionPlan.
AI-assisted analysis of apache/flink@2f3c205e92 (2026-08-14).
Data as JSON: /api/errors/3a37146750d94c09.
Report an issue: GitHub.