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 passed

View on GitHub (pinned to 2add963021)

Solutions

  1. Take the URL from the exception message and test readability on that host (ls -l, cat, or curl for jar: URLs).
  2. Fix permissions/ownership of mapred-queues.xml so the Hadoop daemon user can read it.
  3. Verify HADOOP_CONF_DIR is set correctly on every node and that the file exists there.
  4. 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

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


AI-assisted analysis of apache/hadoop@2add963021 (2026-08-22). Data as JSON: /api/errors/32e493b703013483. Report an issue: GitHub.