apache/flink · error · IOException
Stream is closed
Error message
Stream is closed
What it means
Error "Stream is closed" thrown in apache/flink.
Source
Thrown at flink-filesystems/flink-s3-fs-native/src/main/java/org/apache/flink/fs/s3native/NativeS3InputStream.java:254
if (exception == null) {
exception = e;
} else {
exception.addSuppressed(e);
}
LOG.warn("Error closing S3 response stream for {}/{}", bucketName, key, e);
} finally {
currentStream = null;
}
}
return exception;
}
@Override
public void seek(long desired) throws IOException {
lock();
try {
if (closed) {
throw new IOException("Stream is closed");
}
if (desired < 0) {
throw new EOFException("Cannot seek to negative position: " + desired);
}
if (desired > contentLength) {
throw new EOFException(
"Cannot seek past end of stream: position="
+ desired
+ ", length="
+ contentLength);
}
nextReadPos = desired;
} finally {
lock.unlock();
}
}
View on GitHub (pinned to 2f3c205e92)
Solutions
- Address the cause reported by the error message: Stream is closed
- Verify the inputs, configuration values, and classpath/dependency setup related to this operation, then retry.
Example fix
Correct the condition described ("Stream is closed") and rerun the job or command. When it happens
Trigger: Triggered at runtime when the operation fails because: Stream is closed.
Common situations: Commonly caused by misconfiguration, missing dependencies or files, unsupported types or operations, or invalid user input leading to: Stream is closed.
AI-assisted analysis of apache/flink@2f3c205e92 (2026-08-14).
Data as JSON: /api/errors/64233f1138523edf.
Report an issue: GitHub.