apache/hadoop · error · RuntimeException
No queues defined
Error message
No queues defined
What it means
The parser accepts the <queues> root only when it has at least one element child; an empty <queues></queues> (or one containing only whitespace text nodes) throws this RuntimeException after the 'Bad configuration no queues defined' log line. Note the leading space in the message - it differs from the wrong-root variant at line 194.
Source
Thrown at hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapred/QueueConfigurationParser.java:212
throw new RuntimeException("No queues defined ");
}
NamedNodeMap nmp = queuesNode.getAttributes();
Node acls = nmp.getNamedItem(ACLS_ENABLED_TAG);
if (acls != null) {
LOG.warn("Configuring " + ACLS_ENABLED_TAG + " flag in " +
QueueManager.QUEUE_CONF_FILE_NAME + " is not valid. " +
"This tag is ignored. Configure " +
MRConfig.MR_ACLS_ENABLED + " in mapred-site.xml. See the " +
" documentation of " + MRConfig.MR_ACLS_ENABLED +
", which is used for enabling job level authorization and " +
" queue level authorization.");
}
NodeList props = queuesNode.getChildNodes();
if (props == null || props.getLength() <= 0) {
LOG.info(" Bad configuration no queues defined ");
throw new RuntimeException(" No queues defined ");
}
//We have root level nodes.
for (int i = 0; i < props.getLength(); i++) {
Node propNode = props.item(i);
if (!(propNode instanceof Element)) {
continue;
}
if (!propNode.getNodeName().equals(QUEUE_TAG)) {
LOG.info("At root level only \" queue \" tags are allowed ");
throw
new RuntimeException("Malformed xml document no queue defined ");
}
Element prop = (Element) propNode;
//Add children to root.
Queue q = createHierarchy("", prop);View on GitHub (pinned to 2add963021)
Solutions
- Keep at least one <queue> with a valid <name> - a 'default' queue is the usual minimum
- Restore the file from version control or the packaged default
- Re-run the config lint (root element + non-empty children) before restarting services
Example fix
<!-- before --> <queues></queues> <!-- after --> <queues> <queue><name>default</name></queue> </queues>
Defensive patterns
Strategy: validation
Validate before calling
// deploy-time check: <queues> must contain at least one element child
NodeList children = doc.getDocumentElement().getChildNodes();
boolean anyQueue = false;
for (int i = 0; i < children.getLength(); i++) anyQueue |= children.item(i) instanceof Element;
if (!anyQueue) throw new IllegalArgumentException("mapred-queues.xml defines no queues"); Prevention
- Never ship an emptied queues file - keep a 'default' queue
- Assert non-empty queue lists in config CI
- Version-control queue XML and review deletions in PRs
When it happens
Trigger: mapred-queues.xml where all <queue> entries were deleted or a templating step stripped the children, leaving zero element nodes under <queues>.
Common situations: Queues removed to 'disable' the feature; broken config templating (empty loop generating children); hand-merged conflicts that dropped elements.
Related errors
- No queues defined
- Malformed xml formation queue name not specified
- Configuration file not found at {confFile}
- Improper queue name : {nameValue}
- Malformed xml formation queue tag and acls tags or state ta
AI-assisted analysis of apache/hadoop@2add963021 (2026-08-22).
Data as JSON: /api/errors/cd808f3cda1cddc0.
Report an issue: GitHub.