{"record":{"id":"32e493b703013483","repo":"apache/hadoop","slug":"couldn-t-open-queue-configuration-at-xmlinurl","errorCode":null,"errorMessage":"Couldn't open queue configuration at \" + xmlInUrl","messagePattern":"Couldn't open queue configuration at \" \\+ xmlInUrl","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/QueueManager.java","lineNumber":140,"sourceCode":"        conf.reloadConfiguration();\n      }\n      return new DeprecatedQueueConfigurationParser(conf);\n    } else {\n      URL xmlInUrl =\n        Thread.currentThread().getContextClassLoader()\n          .getResource(QUEUE_CONF_FILE_NAME);\n      if (xmlInUrl == null) {\n        xmlInUrl = Thread.currentThread().getContextClassLoader()\n          .getResource(QUEUE_CONF_DEFAULT_FILE_NAME);\n        assert xmlInUrl != null; // this should be in our jar\n      }\n      InputStream stream = null;\n      try {\n        stream = xmlInUrl.openStream();\n        return new QueueConfigurationParser(new BufferedInputStream(stream),\n            areAclsEnabled);\n      } catch (IOException ioe) {\n        throw new RuntimeException(\"Couldn't open queue configuration at \" +\n                                   xmlInUrl, ioe);\n      } finally {\n        IOUtils.closeStream(stream);\n      }\n    }\n  }\n\n  QueueManager() {// acls are disabled\n    this(false);\n  }\n\n  QueueManager(boolean areAclsEnabled) {\n    this.areAclsEnabled = areAclsEnabled;\n    initialize(getQueueConfigurationParser(null, false, areAclsEnabled));\n  }\n\n  /**\n   * Construct a new QueueManager using configuration specified in the passed","sourceCodeStart":122,"sourceCodeEnd":158,"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/QueueManager.java#L122-L158","documentation":"QueueManager locates mapred-queues.xml on the classpath (falling back to mapred-queues-default.xml bundled in the jar) and opens a stream from that URL. If openStream() throws an IOException, it is wrapped in this RuntimeException and queue configuration fails, which aborts JobTracker/QueueManager startup. The message includes the exact resource URL that could not be opened.","triggerScenarios":"The classloader resolves a URL for mapred-queues.xml but the file cannot be read: deleted between lookup and open, unreadable permissions, a corrupted jar missing mapred-queues-default.xml, or a broken HADOOP_CONF_DIR entry on the classpath.","commonSituations":"Config directory copied partially between nodes; file owned by another user with mode 600; HADOOP_CONF_DIR pointing at a stale path; a repackaged hadoop-mapreduce-client-core jar built without the default queues file.","solutions":["Take the URL from the exception message and test readability on that host (ls -l, cat, or curl for jar: URLs).","Fix permissions/ownership of mapred-queues.xml so the Hadoop daemon user can read it.","Verify HADOOP_CONF_DIR is set correctly on every node and that the file exists there.","If the default fallback is expected, confirm hadoop-mapreduce-client-core.jar actually contains mapred-queues-default.xml and redeploy a clean jar if not."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":"// verify the queue config is actually readable before relying on it\nURL url = cl.getResource(\"mapred-queues.xml\");\nif (url == null) url = cl.getResource(\"mapred-queues-default.xml\");\nif (url == null || !new File(url.getPath()).canRead()) {\n  throw new IOException(\"Queue configuration unreadable: \" + url);\n}","typeGuard":null,"tryCatchPattern":"try {\n  QueueManager qm = new QueueManager(true);\n} catch (RuntimeException e) {\n  Throwable cause = e.getCause();\n  if (cause instanceof IOException) {\n    // log the resource URL from the message, check permissions/classpath\n  }\n  throw e; // configuration failure must abort startup, not be swallowed\n}","preventionTips":["Include mapred-queues.xml permission/ownership checks in node provisioning.","Validate HADOOP_CONF_DIR on all nodes with a preflight script before daemons start.","After rebuilding jars, confirm mapred-queues-default.xml is still packaged."],"tags":["hadoop","mapreduce","configuration","classpath","file-io","startup"],"backgroundTag":"config-file-load-failure","analyzedSha":"2add9630210752f88ceb1bb74eb65e37bf41da8e","analyzedAt":"2026-08-22T19:55:07.957Z","schemaVersion":2},"datasetVersion":"2026-08-22T20:17:22.307Z"}