apache/hadoop · critical · RuntimeException
Couldn't open queue configuration at " + xmlInUrl
Error message
Couldn't open queue configuration at " + xmlInUrl
What it means
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.
Source
Thrown at hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapred/QueueManager.java:140
conf.reloadConfiguration();
}
return new DeprecatedQueueConfigurationParser(conf);
} else {
URL xmlInUrl =
Thread.currentThread().getContextClassLoader()
.getResource(QUEUE_CONF_FILE_NAME);
if (xmlInUrl == null) {
xmlInUrl = Thread.currentThread().getContextClassLoader()
.getResource(QUEUE_CONF_DEFAULT_FILE_NAME);
assert xmlInUrl != null; // this should be in our jar
}
InputStream stream = null;
try {
stream = xmlInUrl.openStream();
return new QueueConfigurationParser(new BufferedInputStream(stream),
areAclsEnabled);
} catch (IOException ioe) {
throw new RuntimeException("Couldn't open queue configuration at " +
xmlInUrl, ioe);
} finally {
IOUtils.closeStream(stream);
}
}
}
QueueManager() {// acls are disabled
this(false);
}
QueueManager(boolean areAclsEnabled) {
this.areAclsEnabled = areAclsEnabled;
initialize(getQueueConfigurationParser(null, false, areAclsEnabled));
}
/**
* Construct a new QueueManager using configuration specified in the passedView on GitHub (pinned to 2add963021)
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.
Defensive patterns
Strategy: try-catch
Validate before calling
// verify the queue config is actually readable before relying on it
URL url = cl.getResource("mapred-queues.xml");
if (url == null) url = cl.getResource("mapred-queues-default.xml");
if (url == null || !new File(url.getPath()).canRead()) {
throw new IOException("Queue configuration unreadable: " + url);
} Try / catch
try {
QueueManager qm = new QueueManager(true);
} catch (RuntimeException e) {
Throwable cause = e.getCause();
if (cause instanceof IOException) {
// log the resource URL from the message, check permissions/classpath
}
throw e; // configuration failure must abort startup, not be swallowed
} Prevention
- 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.
When it happens
Trigger: 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.
Common situations: 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.
Related errors
- Could not locate MapReduce framework name '{}' in mapreduce.
- Configuration file not found at {confFile}
- Compression codec {} was not found.
- Error in instantiating YarnClient
- No KeyProviderFactory for ${uri} in ${KEY_PROVIDER_PATH}
AI-assisted analysis of apache/hadoop@2add963021 (2026-08-22).
Data as JSON: /api/errors/32e493b703013483.
Report an issue: GitHub.