apache/flink · error · IOException
The given file system URI (${fsUri}) did not describe the au
Error message
The given file system URI (${fsUri}) did not describe the authority (like for example HDFS NameNode address/port or S3 host). The attempt to use a configured default authority failed: The configuration contains an invalid file system default name ('fs.default.name' or 'fs.defaultFS'): ${configEntry} What it means
While resolving a missing authority via the default filesystem config, fs.defaultFS (or deprecated fs.default.name) exists but its value is not a parseable URI: java.net.URI.create throws IllegalArgumentException, which HadoopFsFactory wraps in this IOException. The config entry is syntactically invalid (bad characters, malformed scheme, spaces).
Source
Thrown at flink-filesystems/flink-hadoop-fs/src/main/java/org/apache/flink/runtime/fs/hdfs/HadoopFsFactory.java:149
if (configEntry == null) {
// fs.default.name deprecated as of hadoop 2.2.0 - see
// http://hadoop.apache.org/docs/current/hadoop-project-dist/hadoop-common/DeprecatedProperties.html
configEntry = hadoopConfig.get("fs.default.name", null);
}
if (LOG.isDebugEnabled()) {
LOG.debug("Hadoop's 'fs.defaultFS' is set to {}", configEntry);
}
if (configEntry == null) {
throw new IOException(
getMissingAuthorityErrorPrefix(fsUri)
+ "Hadoop configuration did not contain an entry for the default file system ('fs.defaultFS').");
} else {
try {
initUri = URI.create(configEntry);
} catch (IllegalArgumentException e) {
throw new IOException(
getMissingAuthorityErrorPrefix(fsUri)
+ "The configuration contains an invalid file system default name "
+ "('fs.default.name' or 'fs.defaultFS'): "
+ configEntry);
}
if (initUri.getAuthority() == null) {
throw new IOException(
getMissingAuthorityErrorPrefix(fsUri)
+ "Hadoop configuration for default file system ('fs.default.name' or 'fs.defaultFS') "
+ "contains no valid authority component (like hdfs namenode, S3 host, etc)");
}
}
}
// -- (5) configure the Hadoop file system
try {View on GitHub (pinned to 2f3c205e92)
Solutions
- Correct the fs.defaultFS value to a valid URI, e.g. hdfs://namenode:8020
- Check for stray whitespace, quotes, or unresolved ${VAR} placeholders in core-site.xml / flink-conf.yaml
- After fixing, verify with a URI parse test or by running hdfs getconf -confKey fs.defaultFS
Example fix
<!-- before --><property><name>fs.defaultFS</name><value>hdfs: namenode:8020</value></property> <!-- after --><property><name>fs.defaultFS</name><value>hdfs://namenode:8020</value></property>
Defensive patterns
Strategy: validation
Validate before calling
String def = conf.get("fs.defaultFS");
if (def != null) {
try {
URI.create(def.trim());
} catch (IllegalArgumentException e) {
throw new IllegalStateException("fs.defaultFS is not a valid URI: '" + def + "'");
}
} Try / catch
try {
fs = FileSystem.get(uri);
} catch (IOException e) {
if (e.getMessage().contains("invalid file system default name")) {
// fix the fs.defaultFS string in core-site.xml / flink-conf.yaml
}
} Prevention
- Lint configuration files for invalid URI values before deploy
- Avoid hand-editing hostnames into XML; template them from one source
- Watch for whitespace and unresolved placeholders after env substitution
When it happens
Trigger: fs.defaultFS set to a value like 'hdfs: namenode:8020' or 'my namenode' (unparseable); URI.create(configEntry) throws inside HadoopFsFactory.create when the original fsUri lacked an authority.
Common situations: Typos in core-site.xml or flink-conf.yaml; values pasted with quotes/spaces; environment variable substitution producing empty or malformed strings in containerized deployments.
Related errors
- The given file system URI (${fsUri}) did not describe the au
- The given file system URI (${fsUri}) did not describe the au
- Hadoop File System abstraction does not support scheme '${sc
- The Hadoop file system's authority (${initUri.getAuthority()
- Cannot instantiate file system for URI: ${fsUri}
AI-assisted analysis of apache/flink@2f3c205e92 (2026-08-14).
Data as JSON: /api/errors/fbb1e4c6daa574e7.
Report an issue: GitHub.