apache/seatunnel · error · IllegalArgumentException
input.multiline.flush-idle-timeout-ms must not be negative
Error message
input.multiline.flush-idle-timeout-ms must not be negative (input id=${id}). What it means
The multiline flush idle timeout (input.multiline.flush-idle-timeout-ms) controls how long an incomplete multiline buffer is kept before flushing. FileCollectConfig rejects negative values with this IllegalArgumentException, since a negative timeout has no meaning.
Solutions
- Set input.multiline.flush-idle-timeout-ms to a positive value (e.g. 30000)
- Remove the option to use the default timeout
- If multiline is disabled, omit the option rather than using negative sentinels
Example fix
# before input.multiline.flush-idle-timeout-ms = -1 # after input.multiline.flush-idle-timeout-ms = 30000
Defensive patterns
Strategy: validation
Validate before calling
if (cfg.contains(FileCollectOptions.MULTILINE_FLUSH_IDLE_TIMEOUT_MS) && cfg.get(FileCollectOptions.MULTILINE_FLUSH_IDLE_TIMEOUT_MS) < 0L) { throw new IllegalArgumentException("flush-idle-timeout-ms must be >= 0"); } Try / catch
try { FileCollectConfig.from(config); } catch (IllegalArgumentException e) { log.error("Invalid timeout: {}", e.getMessage()); } Prevention
- Never use negative values as 'disabled' sentinels for timeouts
- Omit the option instead of using sentinel values
- Document allowed ranges for generated configs
When it happens
Trigger: Configuring input.multiline.flush-idle-timeout-ms to any negative value in a file-collect input definition.
Common situations: Typo like -1 intending 'disabled', sign errors in generated configs, or misreading the option as a relative offset.
Understand the failure class
Background: "Invalid value" and "allowed values are" config errors: what your library rejected and how to fix it — this error's family across 41 libraries.
- Timeouts: ETIMEDOUT, deadlines, and hung requests — what actually expires when a request times out.
Related errors
- input.close-inactive-ms must be >= 0 when set
- Option 'operation_timeout_ms' must be greater than zero
- Option 'visibility_timeout_seconds' must be between 1 and…
- At least one sink plugin must be configured.
- At least one source plugin must be configured.
AI-assisted analysis of apache/seatunnel@cf67b549a7 (2026-09-10).
Data as JSON: /api/errors/16905ea901235202.
Report an issue: GitHub.
Appendix: source
Thrown at seatunnel-edge-agent/seatunnel-edge-agent-connector/src/main/java/org/apache/seatunnel/edge/agent/connector/config/FileCollectConfig.java:87
}
this.paths = Collections.unmodifiableList(new ArrayList<>(pathList));
this.encoding = config.get(FileCollectOptions.ENCODING);
this.charset = resolveCharset(this.encoding, this.id);
this.readFromBeginning = config.get(FileCollectOptions.READ_FROM_BEGINNING);
this.multilinePattern =
config.getOptional(FileCollectOptions.MULTILINE_PATTERN).orElse(null);
this.multilineMatch = config.get(FileCollectOptions.MULTILINE_MATCH);
validateMultilineMatch(this.multilineMatch);
this.multilineNegate = config.get(FileCollectOptions.MULTILINE_NEGATE);
this.multilineMaxLines = config.get(FileCollectOptions.MULTILINE_MAX_LINES);
if (this.multilineMaxLines < 1) {
throw new IllegalArgumentException(
"input.multiline.max-lines must be >= 1 when set (input id=" + this.id + ").");
}
this.multilineFlushIdleTimeoutMs =
config.get(FileCollectOptions.MULTILINE_FLUSH_IDLE_TIMEOUT_MS);
if (this.multilineFlushIdleTimeoutMs < 0L) {
throw new IllegalArgumentException(
"input.multiline.flush-idle-timeout-ms must not be negative (input id="
+ this.id
+ ").");
}
if (isMultilineEnabled() && this.multilineFlushIdleTimeoutMs <= 0L) {
throw new IllegalArgumentException(
"input.multiline.flush-idle-timeout-ms must be > 0 when multiline is enabled,"
+ " otherwise the buffer may never flush (input id="
+ this.id
+ ").");
}
this.outputType = config.get(FileCollectOptions.OUTPUT_FORMAT_TYPE);
validateOutputType(this.outputType);
this.onError = config.get(FileCollectOptions.ON_ERROR);
validateOnError(this.onError);
this.globScanIntervalMs = config.get(FileCollectOptions.GLOB_SCAN_INTERVAL_MS);
if (this.globScanIntervalMs < 1L) {
throw new IllegalArgumentException(View on GitHub (pinned to cf67b549a7)