{"record":{"id":"293e1e63f55d8a72","repo":"apache/hadoop","slug":"h10","errorCode":"H10","errorMessage":"Hadoop config directory not found [{0}]","messagePattern":"Hadoop config directory not found \\[(.+?)\\]","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":188,"sourceCode":"        throw new ServiceException(FileSystemAccessException.ERROR.H02, ex.getMessage(), ex);\n      }\n      LOG.info(\"Using FileSystemAccess Kerberos authentication, principal [{}] keytab [{}]\", principal, keytab);\n    } else if (security.equals(\"simple\")) {\n      Configuration conf = new Configuration();\n      conf.set(HADOOP_SECURITY_AUTHENTICATION, \"simple\");\n      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  }","sourceCodeStart":170,"sourceCodeEnd":206,"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#L170-L206","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","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"],"exampleFix":"<!-- before -->\n<property><name>httpfs.hadoop.config.dir</name><value>/opt/hadoop/conf-moved-away</value></property>\n\n<!-- after -->\n<property><name>httpfs.hadoop.config.dir</name><value>/etc/hadoop/conf</value></property>","handlingStrategy":"validation","validationCode":"String dir = conf.get(\"httpfs.hadoop.config.dir\", defaultServerConfigDir);\njava.io.File f = new java.io.File(dir);\nif (!f.isDirectory()) { throw new IllegalStateException(\"hadoop conf dir missing: \" + f.getAbsolutePath()); }\nif (!new java.io.File(f, \"core-site.xml\").exists()) { throw new IllegalStateException(\"core-site.xml missing in \" + f); }","typeGuard":null,"tryCatchPattern":null,"preventionTips":["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"],"tags":["httpfs","hadoop-conf","configuration","startup","filesystem"],"backgroundTag":"missing-config-directory","analyzedSha":"2add9630210752f88ceb1bb74eb65e37bf41da8e","analyzedAt":"2026-08-22T19:55:07.957Z","schemaVersion":2},"datasetVersion":"2026-08-22T20:17:22.307Z"}