apache/hadoop · error · IOException

Cannot get children for "{znode}": {message}

Error message

Cannot get children for "{znode}": {message}

What it means

StateStoreZooKeeperImpl fetches records by listing a record znode's children and running per-child getRecord callables on an executor. Any exception during listing/execution is counted as a metrics failure and wrapped as IOException('Cannot get children for "<znode>": <cause message>'). Note the exception embeds only e.getMessage(), so the LOG.error line is the place to see the full stack; the znode name identifies which record class container failed.

Source

Thrown at hadoop-hdfs-project/hadoop-hdfs-rbf/src/main/java/org/apache/hadoop/hdfs/server/federation/store/driver/impl/StateStoreZooKeeperImpl.java:195

        for (Future<T> future : futures) {
          if (future.get() != null) {
            ret.add(future.get());
          }
        }
      } else {
        for (Callable<T> callable : callables) {
          T record = callable.call();
          if (record != null) {
            ret.add(record);
          }
        }
      }
    } catch (Exception e) {
      getMetrics().addFailure(monotonicNow() - start);
      String msg = "Cannot get children for \"" + znode + "\": " +
          e.getMessage();
      LOG.error(msg);
      throw new IOException(msg);
    }
    long end = monotonicNow();
    getMetrics().addRead(end - start);
    return new QueryResult<T>(ret, getTime());
  }

  /**
   * Get one data record in the StateStore or delete it if it's corrupted.
   *
   * @param clazz Record class to evaluate.
   * @param znode The ZNode for the class.
   * @param child The child for znode to get.
   * @return The record to get.
   */
  private <T extends BaseRecord> T getRecord(Class<T> clazz, String znode, String child) {
    T record = null;
    try {
      String path = getNodePath(znode, child);

View on GitHub (pinned to 2add963021)

Solutions

  1. Check the LOG.error line for the full underlying exception — the thrown IOException carries only the message.
  2. Verify the znode from the message exists and is readable (zkCli.sh ls on that path with the router's auth).
  3. Restore ZooKeeper connectivity/auth; the driver recovers on the next monitor cycle.
  4. Restart the router if the failure occurred during initialization so the ZK driver re-establishes its session.
Defensive patterns

Strategy: retry

Try / catch

try {
  QueryResult<T> r = zkDriver.fetchAll(clazz);
} catch (IOException e) {
  String m = e.getMessage();
  if (m != null && m.startsWith("Cannot get children")) {
    // message tail carries the KeeperException text; check LOG.error for the stack
    if (m.contains("ConnectionLoss") || m.contains("SessionExpired")) {
      retryWithBackoff(); // transient ZK
    } else {
      throw e; // NoNode/NoAuth: provision or fix ACLs
    }
  } else { throw e; }
}

Prevention

When it happens

Trigger: KeeperException.ConnectionLoss/SessionExpired/NoAuth while listing the record znode; NoNode when the record znode was deleted or never created; executor interrupted during shutdown; ACL mismatch denying reads on the state store znodes.

Common situations: ZooKeeper outage or session flaps behind the Router; state store znodes deleted out-of-band; ZK security enabled without matching auth on the router; router shutdown racing an in-flight fetch.

Related errors


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