{"record":{"id":"bc85eb2eaccf9759","repo":"apache/hadoop","slug":"h11","errorCode":"H11","errorMessage":"Could not load Hadoop config files, {0}","messagePattern":"Could not load Hadoop config files, (.+?)","errorType":"error_code","errorClass":"ServiceException","httpStatus":null,"severity":"critical","filePath":"hadoop-hdfs-project/hadoop-hdfs-httpfs/src/main/java/org/apache/hadoop/lib/service/hadoop/FileSystemAccessService.java","lineNumber":194,"sourceCode":"      UserGroupInformation.setConfiguration(conf);\n      LOG.info(\"Using FileSystemAccess simple/pseudo authentication, principal [{}]\", System.getProperty(\"user.name\"));\n    } else {\n      throw new ServiceException(FileSystemAccessException.ERROR.H09, security);\n    }\n\n    String hadoopConfDirProp = getServiceConfig().get(HADOOP_CONF_DIR, getServer().getConfigDir());\n    File hadoopConfDir = new File(hadoopConfDirProp).getAbsoluteFile();\n    if (!hadoopConfDir.exists()) {\n      hadoopConfDir = new File(getServer().getConfigDir()).getAbsoluteFile();\n    }\n    if (!hadoopConfDir.exists()) {\n      throw new ServiceException(FileSystemAccessException.ERROR.H10, hadoopConfDir);\n    }\n    try {\n      serviceHadoopConf = loadHadoopConf(hadoopConfDir);\n      fileSystemConf = getNewFileSystemConfiguration();\n    } catch (IOException ex) {\n      throw new ServiceException(FileSystemAccessException.ERROR.H11, ex.toString(), ex);\n    }\n\n    if (LOG.isDebugEnabled()) {\n      LOG.debug(\"FileSystemAccess FileSystem configuration:\");\n      for (Map.Entry entry : serviceHadoopConf) {\n        LOG.debug(\"  {} = {}\", entry.getKey(), entry.getValue());\n      }\n    }\n    setRequiredServiceHadoopConf(serviceHadoopConf);\n\n    nameNodeWhitelist = toLowerCase(getServiceConfig().getTrimmedStringCollection(NAME_NODE_WHITELIST));\n  }\n\n  private Configuration loadHadoopConf(File dir) throws IOException {\n    Configuration hadoopConf = new Configuration(false);\n    for (String file : HADOOP_CONF_FILES) {\n      File f = new File(dir, file);\n      if (f.exists()) {","sourceCodeStart":176,"sourceCodeEnd":212,"githubUrl":"https://github.com/apache/hadoop/blob/2add9630210752f88ceb1bb74eb65e37bf41da8e/hadoop-hdfs-project/hadoop-hdfs-httpfs/src/main/java/org/apache/hadoop/lib/service/hadoop/FileSystemAccessService.java#L176-L212","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","solutions":["Read parameter {0}/the chained cause - it identifies which file and what parse error occurred","Validate the XML: xmllint --noout /etc/hadoop/conf/core-site.xml /etc/hadoop/conf/hdfs-site.xml","Fix the malformed property/element or restore the file from a known-good copy","Confirm file permissions allow the httpfs user to read both files, then restart"],"exampleFix":"<!-- before: unescaped ampersand breaks parsing -> H11 -->\n<property><name>fs.defaultFS</name><value>hdfs://nn1:8020&backup</value></property>\n\n<!-- after -->\n<property><name>fs.defaultFS</name><value>hdfs://nn1:8020</value></property>","handlingStrategy":"validation","validationCode":"for (String site : new String[]{\"core-site.xml\", \"hdfs-site.xml\"}) {\n  javax.xml.parsers.DocumentBuilderFactory.newInstance().newDocumentBuilder()\n    .parse(new java.io.File(hadoopConfDir, site)); // XMLException here instead of H11 at boot\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Validate edited site files with xmllint --noout before deployment","Write configuration atomically (temp file + rename) to avoid truncated XML on restart","Keep known-good copies of site files in version control for instant rollback"],"tags":["httpfs","hadoop-conf","xml","configuration","parsing"],"backgroundTag":"malformed-config-file","analyzedSha":"2add9630210752f88ceb1bb74eb65e37bf41da8e","analyzedAt":"2026-08-22T19:55:07.957Z","schemaVersion":2},"datasetVersion":"2026-08-22T20:17:22.307Z"}