apache/flink · error · EOFException
Cannot seek to negative position: {}
Error message
Cannot seek to negative position: {} What it means
Error "Cannot seek to negative position: {}" thrown in apache/flink.
Source
Thrown at flink-filesystems/flink-s3-fs-native/src/main/java/org/apache/flink/fs/s3native/NativeS3InputStream.java:257
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();
}
}
@Override
public long getPos() throws IOException {
lock();View on GitHub (pinned to 2f3c205e92)
Solutions
- Address the cause reported by the error message: Cannot seek to negative position: the reported value
- Verify the inputs, configuration values, and classpath/dependency setup related to this operation, then retry.
Example fix
Correct the condition described ("Cannot seek to negative position: the reported value") and rerun the job or command. When it happens
Trigger: Triggered at runtime when the operation fails because: Cannot seek to negative position: the reported value.
Common situations: Commonly caused by misconfiguration, missing dependencies or files, unsupported types or operations, or invalid user input leading to: Cannot seek to negative position: the reported value.
AI-assisted analysis of apache/flink@2f3c205e92 (2026-08-14).
Data as JSON: /api/errors/4ce436528e52b0fa.
Report an issue: GitHub.