{"record":{"id":"081454fb668f165b","repo":"apache/seatunnel","slug":"input-close-inactive-ms-must-be-0-when-set-inp","errorCode":null,"errorMessage":"input.close-inactive-ms must be >= 0 when set (input id=${id}).","messagePattern":"input\\.close-inactive-ms must be >= 0 when set \\(input id=(.+?)\\)\\.","errorType":"validation","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"seatunnel-edge-agent/seatunnel-edge-agent-connector/src/main/java/org/apache/seatunnel/edge/agent/connector/config/FileCollectConfig.java","lineNumber":112,"sourceCode":"                    \"input.multiline.flush-idle-timeout-ms must be > 0 when multiline is enabled,\"\n                            + \" otherwise the buffer may never flush (input id=\"\n                            + this.id\n                            + \").\");\n        }\n        this.outputType = config.get(FileCollectOptions.OUTPUT_FORMAT_TYPE);\n        validateOutputType(this.outputType);\n        this.onError = config.get(FileCollectOptions.ON_ERROR);\n        validateOnError(this.onError);\n        this.globScanIntervalMs = config.get(FileCollectOptions.GLOB_SCAN_INTERVAL_MS);\n        if (this.globScanIntervalMs < 1L) {\n            throw new IllegalArgumentException(\n                    \"input.glob-scan-interval-ms must be >= 1 when set (input id=\"\n                            + this.id\n                            + \").\");\n        }\n        this.closeInactiveMs = config.get(FileCollectOptions.CLOSE_INACTIVE_MS);\n        if (this.closeInactiveMs < 0L) {\n            throw new IllegalArgumentException(\n                    \"input.close-inactive-ms must be >= 0 when set (input id=\" + this.id + \").\");\n        }\n    }\n\n    public static FileCollectConfig from(ReadonlyConfig config) {\n        return new FileCollectConfig(config);\n    }\n\n    public boolean isMultilineEnabled() {\n        return multilinePattern != null && !multilinePattern.isEmpty();\n    }\n\n    public boolean isJsonOutput() {\n        return \"json\".equalsIgnoreCase(outputType);\n    }\n\n    public boolean isSkipOnError() {\n        return !\"fail\".equalsIgnoreCase(onError);","sourceCodeStart":94,"sourceCodeEnd":130,"githubUrl":"https://github.com/apache/seatunnel/blob/cf67b549a7a6c35fa0beb12d83c62892427ea919/seatunnel-edge-agent/seatunnel-edge-agent-connector/src/main/java/org/apache/seatunnel/edge/agent/connector/config/FileCollectConfig.java#L94-L130","documentation":"input.close-inactive-ms determines how long an inactive file cursor is kept open before being closed. Negative values are rejected by FileCollectConfig with this IllegalArgumentException; 0 is allowed (close immediately when idle).","triggerScenarios":"Configuring input.close-inactive-ms with a negative value in a file-collect input.","commonSituations":"Sign mistakes when tuning cursor retention, or configs generated from negative sentinel values meaning 'never close'.","solutions":["Set input.close-inactive-ms to 0 or a positive value (e.g. 60000)","Remove the option to keep the default inactivity window","Correct any negative sentinel logic in config generators"],"exampleFix":"# before\ninput.close-inactive-ms = -1000\n# after\ninput.close-inactive-ms = 60000","handlingStrategy":"validation","validationCode":"if (cfg.contains(FileCollectOptions.CLOSE_INACTIVE_MS) && cfg.get(FileCollectOptions.CLOSE_INACTIVE_MS) < 0L) { throw new IllegalArgumentException(\"close-inactive-ms must be >= 0\"); }","typeGuard":null,"tryCatchPattern":"try { FileCollectConfig.from(config); } catch (IllegalArgumentException e) { log.error(\"Invalid close-inactive-ms: {}\", e.getMessage()); }","preventionTips":["Use 0 or positive values; never negative sentinels","Keep inactivity windows well above file write idletime","Validate generated config values in CI"],"tags":["config","validation","timeout"],"backgroundTag":"invalid-config-value","analyzedSha":"cf67b549a7a6c35fa0beb12d83c62892427ea919","analyzedAt":"2026-09-10T21:44:55.265Z","contentChangedAt":"2026-09-10T21:44:55.265Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}