apache/hadoop · error · IOException
No mount point for %s
Error message
No mount point for %s
What it means
Thrown by the RBF Router's ClientProtocol.getEnclosingRoot(String) when it cannot find a mount-table entry covering the requested path. getEnclosingRoot returns the deepest enclosing root (mount point or encryption zone) for a path, and it can only answer if the subcluster resolver is a MountTableResolver that resolves the path, or if a default nameservice fallback is enabled (which yields "/"). If neither holds, mountPath stays null and this IOException is thrown.
Source
Thrown at hadoop-hdfs-project/hadoop-hdfs-rbf/src/main/java/org/apache/hadoop/hdfs/server/federation/router/RouterClientProtocol.java:2104
return rpcServer.getSlowDatanodeReport(true, 0);
}
@Override
public Path getEnclosingRoot(String src) throws IOException {
Path mountPath = null;
if (defaultNameServiceEnabled) {
mountPath = new Path("/");
}
if (subclusterResolver instanceof MountTableResolver) {
MountTableResolver mountTable = (MountTableResolver) subclusterResolver;
if (mountTable.getMountPoint(src) != null) {
mountPath = new Path(mountTable.getMountPoint(src).getSourcePath());
}
}
if (mountPath == null) {
throw new IOException(String.format("No mount point for %s", src));
}
EncryptionZone zone = getEZForPath(src);
if (zone == null) {
return mountPath;
} else {
Path zonePath = new Path(zone.getPath());
return zonePath.depth() > mountPath.depth() ? zonePath : mountPath;
}
}
@Override
public HAServiceProtocol.HAServiceState getHAServiceState() {
if (rpcServer.isSafeMode()) {
return HAServiceProtocol.HAServiceState.STANDBY;
}
return HAServiceProtocol.HAServiceState.ACTIVE;
}View on GitHub (pinned to 2add963021)
Solutions
- Verify the path is covered by a mount entry: run 'hdfs dfsrouteradmin -listMountTable' and check a source path is a prefix of the failing path
- Add a mount point covering the path: hdfs dfsrouteradmin -add /path -ns <nameservice> -dst /dst
- Enable the fallback root by setting dfs.federation.router.default.nameservice.enable=true and dfs.federation.router.default.nameserviceId=<ns> in the router config, then restart the router
- If using a non-mount-table resolver (FileSubclusterResolver/SingleResolver), switch the resolver class to org.apache.hadoop.hdfs.server.federation.resolver.MountTableResolver or accept that getEnclosingRoot is unsupported
- Check router logs/state store connectivity so the MountTableResolver actually loads records, then restart the router
Example fix
// before (hdfs-site.xml on the router) <property><name>dfs.federation.router.subcluster.resolver</name><value>org.apache.hadoop.hdfs.server.federation.resolver.SingleResolverFileSubclusterResolver</value></property> // after <property><name>dfs.federation.router.subcluster.resolver</name><value>org.apache.hadoop.hdfs.server.federation.resolver.MountTableResolver</value></property> <property><name>dfs.federation.router.default.nameservice.enable</name><value>true</value></property> <property><name>dfs.federation.router.default.nameserviceId</name><value>ns0</value></property>
Defensive patterns
Strategy: try-catch
Validate before calling
// Resolve the path against the mount table before calling getEnclosingRoot
SubclusterResolver resolver = router.getSubclusterResolver();
if (resolver instanceof MountTableResolver) {
Path target = new Path(src);
if (((MountTableResolver) resolver).getMountPoint(src) == null
&& !conf.getBoolean("dfs.federation.router.default.nameservice.enable", false)) {
LOG.warn("{} has no mount point and no default NS fallback; getEnclosingRoot will fail", src);
}
} Type guard
boolean isResolvableByMountTable(SubclusterResolver r, String src) {
return r instanceof MountTableResolver
&& ((MountTableResolver) r).getMountPoint(src) != null;
} Try / catch
try {
Path root = clientProtocol.getEnclosingRoot(src);
} catch (IOException e) {
if (e.getMessage() != null && e.getMessage().startsWith("No mount point for")) {
// path outside mount table: fall back to default nameservice root or fail with context
throw new IllegalArgumentException("Path not mounted: " + src
+ ". Add a mount entry or enable dfs.federation.router.default.nameservice.enable", e);
}
throw e;
} Prevention
- Keep a mount entry covering every client-visible path; audit with 'hdfs dfsrouteradmin -listMountTable' after mount changes
- Enable the default nameservice fallback when a catch-all root is acceptable
- Monitor state store connectivity so the router never serves with an empty mount table cache
When it happens
Trigger: A client calls ClientProtocol#getEnclosingRoot(path) (or an API that funnels into it, e.g. DFSClient trash handling / -expunge through the router) while: (1) the router's subcluster resolver is not a MountTableResolver (e.g. SingleResolverFileSubclusterResolver or a custom resolver), or (2) the path resolves to no mount point because the mount table does not cover it or was never loaded (state store down at router start), and dfs.federation.router.default.nameservice.enable is false so no fallback root is set.
Common situations: Router configured with a file-based or custom resolver instead of the mount table; path sits above/outside all mount entries; state store (ZK/JDBC) unreachable when the router booted so the mount table cache is empty; default nameservice fallback not configured; clients hitting the router immediately after startup before mount table load.
Related errors
- Rename of {} to {} is not allowed, no eligible destination i
- Rename of {} to {} is not allowed. The remote location shoul
- Permission denied while accessing mount table {}: user {} do
- Cannot find locations for {} in {}
- Cannot find locations for {}, because the default nameservic
AI-assisted analysis of apache/hadoop@2add963021 (2026-08-22).
Data as JSON: /api/errors/2c5f37d0cb61700c.
Report an issue: GitHub.