apache/hadoop · critical · ServiceException
H10
H10
Error message
Hadoop config directory not found [{0}] What it means
FileSystemAccessService needs a Hadoop configuration directory containing core-site.xml and hdfs-site.xml. It resolves httpfs.hadoop.config.dir (constant 'config.dir'; defaults to the server config dir); if that directory does not exist it falls back to the server's own config dir, and if that also does not exist it throws error H10 ('Hadoop config directory not found') at startup with the absolute path it tried.
Source
Thrown at hadoop-hdfs-project/hadoop-hdfs-httpfs/src/main/java/org/apache/hadoop/lib/service/hadoop/FileSystemAccessService.java:188
throw new ServiceException(FileSystemAccessException.ERROR.H02, ex.getMessage(), ex);
}
LOG.info("Using FileSystemAccess Kerberos authentication, principal [{}] keytab [{}]", principal, keytab);
} else if (security.equals("simple")) {
Configuration conf = new Configuration();
conf.set(HADOOP_SECURITY_AUTHENTICATION, "simple");
UserGroupInformation.setConfiguration(conf);
LOG.info("Using FileSystemAccess simple/pseudo authentication, principal [{}]", System.getProperty("user.name"));
} else {
throw new ServiceException(FileSystemAccessException.ERROR.H09, security);
}
String hadoopConfDirProp = getServiceConfig().get(HADOOP_CONF_DIR, getServer().getConfigDir());
File hadoopConfDir = new File(hadoopConfDirProp).getAbsoluteFile();
if (!hadoopConfDir.exists()) {
hadoopConfDir = new File(getServer().getConfigDir()).getAbsoluteFile();
}
if (!hadoopConfDir.exists()) {
throw new ServiceException(FileSystemAccessException.ERROR.H10, hadoopConfDir);
}
try {
serviceHadoopConf = loadHadoopConf(hadoopConfDir);
fileSystemConf = getNewFileSystemConfiguration();
} catch (IOException ex) {
throw new ServiceException(FileSystemAccessException.ERROR.H11, ex.toString(), ex);
}
if (LOG.isDebugEnabled()) {
LOG.debug("FileSystemAccess FileSystem configuration:");
for (Map.Entry entry : serviceHadoopConf) {
LOG.debug(" {} = {}", entry.getKey(), entry.getValue());
}
}
setRequiredServiceHadoopConf(serviceHadoopConf);
nameNodeWhitelist = toLowerCase(getServiceConfig().getTrimmedStringCollection(NAME_NODE_WHITELIST));
}View on GitHub (pinned to 2add963021)
Solutions
- Point httpfs.hadoop.config.dir in httpfs-site.xml to an existing directory that contains core-site.xml and hdfs-site.xml
- Verify the directory exists and is readable by the httpfs user (ls -ld /etc/hadoop/conf)
- If relying on the default, fix the server config dir location for the httpfs instance
- Restart httpfs after correcting the path
Example fix
<!-- before --> <property><name>httpfs.hadoop.config.dir</name><value>/opt/hadoop/conf-moved-away</value></property> <!-- after --> <property><name>httpfs.hadoop.config.dir</name><value>/etc/hadoop/conf</value></property>
Defensive patterns
Strategy: validation
Validate before calling
String dir = conf.get("httpfs.hadoop.config.dir", defaultServerConfigDir);
java.io.File f = new java.io.File(dir);
if (!f.isDirectory()) { throw new IllegalStateException("hadoop conf dir missing: " + f.getAbsolutePath()); }
if (!new java.io.File(f, "core-site.xml").exists()) { throw new IllegalStateException("core-site.xml missing in " + f); } Prevention
- Pin httpfs.hadoop.config.dir to an absolute, versioned path in configuration management
- Add an startup precheck (directory exists, contains core-site.xml and hdfs-site.xml)
- Re-run the precheck in deployment pipelines so moved conf dirs are caught before restart
When it happens
Trigger: Neither httpfs.hadoop.config.dir nor the httpfs server config directory exists on disk: wrong or moved path, environment variable used before it was defined, or httpfs installed with a custom layout where neither default matches.
Common situations: HADOOP_CONF_DIR moved after install and httpfs.hadoop.config.dir still points to the old path; deploying the httpfs war in a foreign servlet container where the default config dir does not resolve; typo in the configured path.
Related errors
AI-assisted analysis of apache/hadoop@2add963021 (2026-08-22).
Data as JSON: /api/errors/293e1e63f55d8a72.
Report an issue: GitHub.