{"record":{"id":"d9b5c450976d2e94","repo":"apache/flink","slug":"the-hadoop-file-system-s-authority-inituri-geta","errorCode":null,"errorMessage":"The Hadoop file system's authority (${initUri.getAuthority()}), specified by either the file URI or the configuration, cannot be resolved.","messagePattern":"The Hadoop file system's authority \\((.+?)\\), specified by either the file URI or the configuration, cannot be resolved\\.","errorType":"exception","errorClass":"IOException","httpStatus":null,"severity":"error","filePath":"flink-filesystems/flink-hadoop-fs/src/main/java/org/apache/flink/runtime/fs/hdfs/HadoopFsFactory.java","lineNumber":175,"sourceCode":"                        throw new IOException(\n                                getMissingAuthorityErrorPrefix(fsUri)\n                                        + \"Hadoop configuration for default file system ('fs.default.name' or 'fs.defaultFS') \"\n                                        + \"contains no valid authority component (like hdfs namenode, S3 host, etc)\");\n                    }\n                }\n            }\n\n            // -- (5) configure the Hadoop file system\n\n            try {\n                hadoopFs.initialize(initUri, hadoopConfig);\n            } catch (UnknownHostException e) {\n                String message =\n                        \"The Hadoop file system's authority (\"\n                                + initUri.getAuthority()\n                                + \"), specified by either the file URI or the configuration, cannot be resolved.\";\n\n                throw new IOException(message, e);\n            }\n\n            HadoopFileSystem fs = new HadoopFileSystem(hadoopFs);\n\n            // create the Flink file system, optionally limiting the open connections\n            if (flinkConfig != null) {\n                return limitIfConfigured(fs, scheme, flinkConfig);\n            } else {\n                return fs;\n            }\n        } catch (ReflectiveOperationException | LinkageError e) {\n            throw new UnsupportedFileSystemSchemeException(\n                    \"Cannot support file system for '\"\n                            + fsUri.getScheme()\n                            + \"' via Hadoop, because Hadoop is not in the classpath, or some classes \"\n                            + \"are missing from the classpath.\",\n                    e);\n        } catch (IOException e) {","sourceCodeStart":157,"sourceCodeEnd":193,"githubUrl":"https://github.com/apache/flink/blob/2f3c205e9266cb30240eb7f4fdab15cad629a70f/flink-filesystems/flink-hadoop-fs/src/main/java/org/apache/flink/runtime/fs/hdfs/HadoopFsFactory.java#L157-L193","documentation":"After the Hadoop FileSystem instance is created, hadoopFs.initialize(initUri, config) throws UnknownHostException: the authority (host) from the URI or fs.defaultFS cannot be resolved by DNS. The factory wraps it in an IOException naming the unresolvable authority.","triggerScenarios":"Creating a filesystem for hdfs://bad-host:8020 where 'bad-host' fails DNS resolution during initialize(); similarly any S3/other Hadoop-compatible endpoint hostname that does not resolve.","commonSituations":"Typo in the NameNode hostname; missing /etc/hosts entry or DNS in containers/K8s; network isolation between Flink nodes and the storage system; NameNode host renamed but configs not updated.","solutions":["Verify the hostname: run `nslookup <host>` or `ping <host>` from the Flink node and fix typos in the URI/fs.defaultFS","Add the correct DNS record or /etc/hosts entry on every TaskManager/JobManager node (or K8s NetworkPolicy/DNS config)","If a proxy/gateway is required, configure it (e.g. hadoop proxy settings) instead of the raw NameNode host","Confirm /etc/resolv.conf on containers points to a resolver that knows the storage hostname"],"exampleFix":"# before\nstate.checkpoints.dir: hdfs://namenode01:8020/checkpoints  # typo\n# after\nstate.checkpoints.dir: hdfs://namenode-01:8020/checkpoints","handlingStrategy":"retry","validationCode":"// pre-flight DNS check on the authority host\nString host = URI.create(fsPath).getHost();\nif (host != null && InetAddress.getByName(host) == null) { /* unreachable practically; getByName throws */ }","typeGuard":null,"tryCatchPattern":"try {\n    fs = FileSystem.get(uri);\n} catch (IOException e) {\n    if (e.getCause() instanceof java.net.UnknownHostException) {\n        // DNS problem: fix hosts/DNS, then retry creation; transient in K8s during startup\n    }\n}","preventionTips":["Verify hostname resolution from every Flink node before deploy","In containers, ensure DNS/NetworkPolicy allows reaching the storage host","Retry filesystem creation on UnknownHostException with backoff at startup"],"tags":["hdfs","dns","network","configuration"],"backgroundTag":null,"analyzedSha":"2f3c205e9266cb30240eb7f4fdab15cad629a70f","analyzedAt":"2026-08-14T08:48:24.518Z","schemaVersion":2},"datasetVersion":"2026-08-14T10:17:34.591Z"}