apache/hadoop · critical · ServiceException

H11

H11

Error message

Could not load Hadoop config files, {0}

What it means

After locating the Hadoop config directory, FileSystemAccessService loads core-site.xml/hdfs-site.xml (loadHadoopConf) and builds the FileSystem configuration. Error H11 ('Could not load Hadoop config files') is thrown when that step raises an IOException; ex.toString() is parameter {0} and the IOException is chained. Startup aborts.

Source

Thrown at hadoop-hdfs-project/hadoop-hdfs-httpfs/src/main/java/org/apache/hadoop/lib/service/hadoop/FileSystemAccessService.java:194

      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));
  }

  private Configuration loadHadoopConf(File dir) throws IOException {
    Configuration hadoopConf = new Configuration(false);
    for (String file : HADOOP_CONF_FILES) {
      File f = new File(dir, file);
      if (f.exists()) {

View on GitHub (pinned to 2add963021)

Solutions

  1. Read parameter {0}/the chained cause - it identifies which file and what parse error occurred
  2. Validate the XML: xmllint --noout /etc/hadoop/conf/core-site.xml /etc/hadoop/conf/hdfs-site.xml
  3. Fix the malformed property/element or restore the file from a known-good copy
  4. Confirm file permissions allow the httpfs user to read both files, then restart

Example fix

<!-- before: unescaped ampersand breaks parsing -> H11 -->
<property><name>fs.defaultFS</name><value>hdfs://nn1:8020&backup</value></property>

<!-- after -->
<property><name>fs.defaultFS</name><value>hdfs://nn1:8020</value></property>
Defensive patterns

Strategy: validation

Validate before calling

for (String site : new String[]{"core-site.xml", "hdfs-site.xml"}) {
  javax.xml.parsers.DocumentBuilderFactory.newInstance().newDocumentBuilder()
    .parse(new java.io.File(hadoopConfDir, site)); // XMLException here instead of H11 at boot
}

Prevention

When it happens

Trigger: An IOException while reading/parsing the XML in the resolved hadoop conf dir: malformed or truncated core-site.xml/hdfs-site.xml, an unreadable file (permissions), a directory entry that cannot be read, or an XML parsing failure inside Hadoop's Configuration loader.

Common situations: Hand-edited site file with a missing closing tag or unescaped ampersand; deploy tooling wrote a partial file during a restart window; permission changes that deny read access to the config dir.

Related errors


AI-assisted analysis of apache/hadoop@2add963021 (2026-08-22). Data as JSON: /api/errors/bc85eb2eaccf9759. Report an issue: GitHub.