{"record":{"id":"a20516a27f009e7b","repo":"apache/flink","slug":"input-opening-request-timed-out-opener-was-ali","errorCode":null,"errorMessage":"Input opening request timed out. Opener was {} alive. Stack of split open thread:\n{}","messagePattern":"Input opening request timed out\\. Opener was (.+?) alive\\. Stack of split open thread:\n(.+?)","errorType":"exception","errorClass":"IOException","httpStatus":null,"severity":"error","filePath":"flink-core/src/main/java/org/apache/flink/api/common/io/FileInputFormat.java","lineNumber":1043,"sourceCode":"            if (this.error != null) {\n                throw this.error;\n            }\n            if (this.fdis != null) {\n                return this.fdis;\n            } else {\n                // double-check that the stream has not been set by now. we don't know here whether\n                // a) the opener thread recognized the canceling and closed the stream\n                // b) the flag was set such that the stream did not see it and we have a valid\n                // stream\n                // In any case, close the stream and throw an exception.\n                abortWait();\n\n                final boolean stillAlive = this.isAlive();\n                final StringBuilder bld = new StringBuilder(256);\n                for (StackTraceElement e : this.getStackTrace()) {\n                    bld.append(\"\\tat \").append(e.toString()).append('\\n');\n                }\n                throw new IOException(\n                        \"Input opening request timed out. Opener was \"\n                                + (stillAlive ? \"\" : \"NOT \")\n                                + \" alive. Stack of split open thread:\\n\"\n                                + bld.toString());\n            }\n        }\n\n        /** Double checked procedure setting the abort flag and closing the stream. */\n        private void abortWait() {\n            this.aborted = true;\n            final FSDataInputStream inStream = this.fdis;\n            this.fdis = null;\n            if (inStream != null) {\n                try {\n                    inStream.close();\n                } catch (Throwable t) {\n                }\n            }","sourceCodeStart":1025,"sourceCodeEnd":1061,"githubUrl":"https://github.com/apache/flink/blob/2f3c205e9266cb30240eb7f4fdab15cad629a70f/flink-core/src/main/java/org/apache/flink/api/common/io/FileInputFormat.java#L1025-L1061","documentation":"Thrown by InputSplitOpenThread.waitForCompletion when the async file-open thread does not finish within the configured openTimeout. The message records whether the opener thread was still alive and dumps its stack trace, which is the primary diagnostic for identifying where the open is stuck.","triggerScenarios":"The FileSystem.open call blocks indefinitely (slow HDFS namenode, S3 throttling, DNS hang); openTimeout is set too low for a high-latency store; the opener thread deadlocks on FS initialization; network partition between TaskManager and the storage layer.","commonSituations":"Reading from S3/GCS/Azure Blob with default openTimeout while the store is throttled; first-read cold path on a kerberized HDFS where TGT acquisition is slow; misconfigured openTimeout below the store's typical open latency; TaskManager on a host with DNS resolution stalls.","solutions":["Raise openTimeout via the input format: format.setOpenTimeout(...) or the 'input.file.open.timeout' / CoreOptions config, sized above the store's worst-case open latency.","Use the stack trace in the message to identify the blocking call (e.g., stuck in Namenode RPC, S3 client) and address that layer.","For object stores, tune the store-specific client timeout/retry config and ensure proper connection pooling.","Verify network/DNS between TaskManagers and the storage endpoint; check for kerberos ticket expiry."],"exampleFix":"// before: default openTimeout too short for S3\nTextInputFormat format = new TextInputFormat(new Path(\"s3://bucket/data/\"));\n\n// after: raise the timeout for high-latency stores\nformat.setOpenTimeout(5 * 60 * 1000L); // 5 minutes","handlingStrategy":"retry","validationCode":"// Size openTimeout to the store's worst-case open latency\nlong storeOpenP99Ms = 30_000L; // measure for your store\nlong openTimeout = Math.max(format.getOpenTimeout(), storeOpenP99Ms * 4);\nformat.setOpenTimeout(openTimeout);","typeGuard":null,"tryCatchPattern":"// Distinguish timeout from hard open errors to decide retry\ntry {\n    format.open(split);\n} catch (IOException e) {\n    if (e.getMessage().contains(\"timed out\")) {\n        // transient: backoff and retry, or raise openTimeout\n    } else {\n        throw e;\n    }\n}","preventionTips":["Set openTimeout above the store's measured p99 open latency (especially for S3/GCS).","Use the stack trace in the message to find the blocking call.","Tune the object-store client's own retry/timeout settings.","Check DNS/kerberos health between TaskManager and storage."],"tags":["flink","file-input","timeout","filesystem","s3","hdfs","performance"],"backgroundTag":null,"analyzedSha":"2f3c205e9266cb30240eb7f4fdab15cad629a70f","analyzedAt":"2026-08-14T08:48:24.518Z","schemaVersion":2},"datasetVersion":"2026-08-14T10:17:34.591Z"}