{"record":{"id":"ede796001e5a14f5","repo":"apache/hadoop","slug":"configuration-file-not-found-at-conffile","errorCode":null,"errorMessage":"Configuration file not found at {confFile}","messagePattern":"Configuration file not found at (.+?)","errorType":"exception","errorClass":"RuntimeException","httpStatus":null,"severity":"critical","filePath":"hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapred/QueueConfigurationParser.java","lineNumber":104,"sourceCode":"  static final String STATE_TAG = \"state\";\n  static final String QUEUE_NAME_TAG = \"name\";\n  static final String QUEUES_TAG = \"queues\";\n  static final String PROPERTY_TAG = \"property\";\n  static final String KEY_TAG = \"key\";\n  static final String VALUE_TAG = \"value\";\n\n  /**\n   * Default constructor for QueueConfigurationParser.\n   */\n  QueueConfigurationParser() {\n    \n  }\n\n  QueueConfigurationParser(String confFile, boolean areAclsEnabled) {\n    aclsEnabled = areAclsEnabled;\n    File file = new File(confFile).getAbsoluteFile();\n    if (!file.exists()) {\n      throw new RuntimeException(\"Configuration file not found at \" +\n                                 confFile);\n    }\n    InputStream in = null;\n    try {\n      in = new BufferedInputStream(new FileInputStream(file));\n      loadFrom(in);\n    } catch (IOException ioe) {\n      throw new RuntimeException(ioe);\n    } finally {\n      IOUtils.closeStream(in);\n    }\n  }\n\n  QueueConfigurationParser(InputStream xmlInput, boolean areAclsEnabled) {\n    aclsEnabled = areAclsEnabled;\n    loadFrom(xmlInput);\n  }\n","sourceCodeStart":86,"sourceCodeEnd":122,"githubUrl":"https://github.com/apache/hadoop/blob/2add9630210752f88ceb1bb74eb65e37bf41da8e/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapred/QueueConfigurationParser.java#L86-L122","documentation":"The legacy queue-configuration parser behind mapred-queues.xml throws this RuntimeException when constructed with an explicit file path that does not exist on disk (checked via getAbsoluteFile().exists()). It is a hard startup failure for whatever component builds the parser - legacy JobTracker-style deployments, tools, or tests using the path-based constructor.","triggerScenarios":"QueueConfigurationParser(confFile, areAclsEnabled) is passed a path that resolves to a nonexistent absolute file: file never created, wrong directory, typo in the configured path, or a relative path resolved against an unexpected process working directory.","commonSituations":"MR1-style config pointing at mapred-queues.xml that was never shipped to the node; deploy scripts referencing a missing conf dir; tests passing a temp path that was already cleaned; CWD changes making a relative path dangle.","solutions":["Create a valid file at the exact path: root <queues> containing at least one <queue><name>...</name></queue>","Make the configured path absolute, or ensure mapred-queues.xml is on the classpath","Verify with ls on the host where the component starts; remember relative paths resolve against process CWD","On YARN/MR2 clusters prefer capacity-scheduler.xml unless you intentionally use the legacy queue manager"],"exampleFix":"<!-- before: file missing at /etc/hadoop/mapred-queues.xml -->\n\n<!-- after: /etc/hadoop/mapred-queues.xml -->\n<queues>\n  <queue>\n    <name>default</name>\n  </queue>\n</queues>","handlingStrategy":"validation","validationCode":"// fail with a clear message before constructing the parser\nFile f = new File(confFile).getAbsoluteFile();\nif (!f.isFile()) throw new FileNotFoundException(\"queue config missing: \" + f\n    + \" - create it or fix the configured path\");\nnew QueueConfigurationParser(confFile, areAclsEnabled);","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Ship mapred-queues.xml with the deployment or drop legacy queue configuration entirely","Use absolute paths for file-based queue configuration","Add a startup smoke check that required config files exist before launching services"],"tags":["hadoop","mapreduce","queues","configuration","missing-file","startup"],"backgroundTag":"missing-config-file","analyzedSha":"2add9630210752f88ceb1bb74eb65e37bf41da8e","analyzedAt":"2026-08-22T19:55:07.957Z","schemaVersion":2},"datasetVersion":"2026-08-23T01:17:44.959Z"}