apache/seatunnel · error · SeaTunnelException
skipped error
Error message
skipped error
What it means
When positioning an input stream at a split's start offset and the stream is not Seekable, the code skips bytes in a loop; if InputStream.skip() returns <= 0 (cannot make progress) it throws SeaTunnelException("skipped error") instead of looping forever.
Source
Thrown at seatunnel-connectors-v2/connector-file/connector-file-base/src/main/java/org/apache/seatunnel/connectors/seatunnel/file/source/reader/AbstractReadStrategy.java:713
}
log.warn(
"The {} file format is incorrect. Please check the format in the compressed file.",
fileName);
return false;
}
protected static InputStream safeSlice(InputStream in, long start, long length)
throws IOException {
if (start > 0) {
if (in instanceof Seekable) {
((Seekable) in).seek(start);
} else {
long toSkip = start;
while (toSkip > 0) {
long skipped = in.skip(toSkip);
if (skipped <= 0) {
throw new SeaTunnelException("skipped error");
}
toSkip -= skipped;
}
}
}
if (length < 0) {
return in;
}
return new BoundedInputStream(in, length);
}
protected static BufferedReader createBomAwareBufferedReader(
InputStream inputStream, String encoding) throws IOException {
BOMInputStream bomInputStream =
new BOMInputStream(
inputStream,
ByteOrderMark.UTF_8,
ByteOrderMark.UTF_16BE,View on GitHub (pinned to cf67b549a7)
Solutions
- Upgrade/replace the filesystem implementation so its streams support skip or Seekable.
- Avoid reading splits with non-zero start offsets for this storage (e.g. disable split-based reads or use a format without offset positioning).
- Check whether the underlying file/stream is truncated or the network connection stalled, and retry after fixing storage connectivity.
Defensive patterns
Strategy: retry
Try / catch
try {
read(split);
} catch (SeaTunnelException e) {
if ("skipped error".equals(e.getMessage())) {
// reopen the stream or retry after checking storage health
}
} Prevention
- Use storage backends whose streams implement Seekable/skip correctly
- Monitor network stability to the filesystem (NFS/S3 gateways)
- Retry transient stream failures at the job level
When it happens
Trigger: Reading a split with a non-zero start offset over an input stream that implements neither Seekable nor reliable skip — typically skip() returning 0 repeatedly on a wrapped/blocked stream inside an archive or custom filesystem stream.
Common situations: Non-seekable or partially-broken streams (e.g. certain compressed or network-backed streams) where skip() makes no progress; custom Hadoop-compatible filesystems with buggy stream implementations.
Understand the failure class
Background: "failed to read file", EACCES, ENOENT and "could not read <path>" errors: when a program can't read a file from disk — this error's family across 49 libraries.
Related errors
- Failed to create checkpoint file ${fileName}
- Failed to write checkpoint data to file ${fileName}
- Fallback content comparison failed, fallback to COPY. source
- Error during file discovery
- Trace file already closed: {}
AI-assisted analysis of apache/seatunnel@cf67b549a7 (2026-09-10).
Data as JSON: /api/errors/6fec2c924529b345.
Report an issue: GitHub.