apache/hadoop · error · IOException

No mount point for %s

Error message

No mount point for %s

What it means

RouterAsyncClientProtocol.getEnclosingRoot computes the enclosing root of a path (mount point or deeper encryption zone) for clients like HFDS encryption tooling. It starts from the default-nameservice root if enabled (dfs.federation.router.default.nameservice.*), otherwise it relies on MountTableResolver.getMountPoint(src). If neither yields a mount path (resolver is not a MountTableResolver, or no mount entry covers src and no default nameservice is enabled), it throws IOException('No mount point for <src>').

Source

Thrown at hadoop-hdfs-project/hadoop-hdfs-rbf/src/main/java/org/apache/hadoop/hdfs/server/federation/router/async/RouterAsyncClientProtocol.java:1180

    return asyncReturn(boolean.class);
  }

  @Override
  public Path getEnclosingRoot(String src) throws IOException {
    final Path[] mountPath = new Path[1];
    if (defaultNameServiceEnabled) {
      mountPath[0] = new Path("/");
    }

    if (subclusterResolver instanceof MountTableResolver) {
      MountTableResolver mountTable = (MountTableResolver) subclusterResolver;
      if (mountTable.getMountPoint(src) != null) {
        mountPath[0] = new Path(mountTable.getMountPoint(src).getSourcePath());
      }
    }

    if (mountPath[0] == null) {
      throw new IOException(String.format("No mount point for %s", src));
    }

    getEZForPath(src);
    asyncApply((ApplyFunction<EncryptionZone, Path>)zone -> {
      if (zone == null) {
        return mountPath[0];
      } else {
        Path zonePath = new Path(zone.getPath());
        return zonePath.depth() > mountPath[0].depth() ? zonePath : mountPath[0];
      }
    });
    return asyncReturn(Path.class);
  }

  @Override
  public Token<DelegationTokenIdentifier> getDelegationToken(Text renewer)
      throws IOException {
    rpcServer.checkOperation(NameNode.OperationCategory.WRITE, true);

View on GitHub (pinned to 2add963021)

Solutions

  1. Add a mount entry covering the path (hdfs dfsrouteradmin -add /path ns1; -refresh)
  2. Or enable the fallback root: set dfs.federation.router.default.nameservice.enabled=true and dfs.federation.router.default.nameservice=<ns> so '/' is the enclosing root
  3. Ensure dfs.federation.router.subcluster.resolver=org.apache.hadoop.hdfs.server.federation.resolver.MountTableResolver if mount semantics are expected

Example fix

<!-- before -->
<property>
  <name>dfs.federation.router.subcluster.resolver</name>
  <value>org.apache.hadoop.hdfs.server.federation.resolver.SubclusterResolverCustom</value>
</property>

<!-- after -->
<property>
  <name>dfs.federation.router.subcluster.resolver</name>
  <value>org.apache.hadoop.hdfs.server.federation.resolver.MountTableResolver</value>
</property>
Defensive patterns

Strategy: try-catch

Validate before calling

// Precheck mount coverage before crypto/enclosing-root flows:
// hdfs dfsrouteradmin -ls <path-prefix>
// must show an entry covering the path, or enable default nameservice.

Try / catch

catch (IOException e) {
  if (e.getMessage().startsWith("No mount point for ")) {
    // add a mount entry covering the path, or enable
    // dfs.federation.router.default.nameservice.* on the Router
  }
}

Prevention

When it happens

Trigger: Calling getEnclosingRoot (e.g. 'hdfs crypto' flows via an async Router) for a path not covered by any mount-table entry while the default nameservice feature is disabled; using a subcluster resolver other than MountTableResolver (e.g. ConstantResolver/SingleResolver) which has no mount points.

Common situations: Encryption-zone tooling run through a Router whose mount table lacks an entry for the path; deployments with resolver class dfs.federation.router.subcluster.resolver set to a non-mount-table implementation; default nameservice disabled after an admin refactor.

Related errors


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