{"record":{"id":"2c5f37d0cb61700c","repo":"apache/hadoop","slug":"no-mount-point-for-s","errorCode":null,"errorMessage":"No mount point for %s","messagePattern":"No mount point for (.+?)","errorType":"exception","errorClass":"IOException","httpStatus":null,"severity":"error","filePath":"hadoop-hdfs-project/hadoop-hdfs-rbf/src/main/java/org/apache/hadoop/hdfs/server/federation/router/RouterClientProtocol.java","lineNumber":2104,"sourceCode":"    return rpcServer.getSlowDatanodeReport(true, 0);\n  }\n\n  @Override\n  public Path getEnclosingRoot(String src) throws IOException {\n    Path mountPath = null;\n    if (defaultNameServiceEnabled) {\n      mountPath = new Path(\"/\");\n    }\n\n    if (subclusterResolver instanceof MountTableResolver) {\n      MountTableResolver mountTable = (MountTableResolver) subclusterResolver;\n      if (mountTable.getMountPoint(src) != null) {\n        mountPath = new Path(mountTable.getMountPoint(src).getSourcePath());\n      }\n    }\n\n    if (mountPath == null) {\n      throw new IOException(String.format(\"No mount point for %s\", src));\n    }\n\n    EncryptionZone zone = getEZForPath(src);\n    if (zone == null) {\n      return mountPath;\n    } else {\n      Path zonePath = new Path(zone.getPath());\n      return zonePath.depth() > mountPath.depth() ? zonePath : mountPath;\n    }\n  }\n\n  @Override\n  public HAServiceProtocol.HAServiceState getHAServiceState() {\n    if (rpcServer.isSafeMode()) {\n      return HAServiceProtocol.HAServiceState.STANDBY;\n    }\n    return HAServiceProtocol.HAServiceState.ACTIVE;\n  }","sourceCodeStart":2086,"sourceCodeEnd":2122,"githubUrl":"https://github.com/apache/hadoop/blob/2add9630210752f88ceb1bb74eb65e37bf41da8e/hadoop-hdfs-project/hadoop-hdfs-rbf/src/main/java/org/apache/hadoop/hdfs/server/federation/router/RouterClientProtocol.java#L2086-L2122","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","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"],"exampleFix":"// before (hdfs-site.xml on the router)\n<property><name>dfs.federation.router.subcluster.resolver</name><value>org.apache.hadoop.hdfs.server.federation.resolver.SingleResolverFileSubclusterResolver</value></property>\n// after\n<property><name>dfs.federation.router.subcluster.resolver</name><value>org.apache.hadoop.hdfs.server.federation.resolver.MountTableResolver</value></property>\n<property><name>dfs.federation.router.default.nameservice.enable</name><value>true</value></property>\n<property><name>dfs.federation.router.default.nameserviceId</name><value>ns0</value></property>","handlingStrategy":"try-catch","validationCode":"// Resolve the path against the mount table before calling getEnclosingRoot\nSubclusterResolver resolver = router.getSubclusterResolver();\nif (resolver instanceof MountTableResolver) {\n  Path target = new Path(src);\n  if (((MountTableResolver) resolver).getMountPoint(src) == null\n      && !conf.getBoolean(\"dfs.federation.router.default.nameservice.enable\", false)) {\n    LOG.warn(\"{} has no mount point and no default NS fallback; getEnclosingRoot will fail\", src);\n  }\n}","typeGuard":"boolean isResolvableByMountTable(SubclusterResolver r, String src) {\n  return r instanceof MountTableResolver\n      && ((MountTableResolver) r).getMountPoint(src) != null;\n}","tryCatchPattern":"try {\n  Path root = clientProtocol.getEnclosingRoot(src);\n} catch (IOException e) {\n  if (e.getMessage() != null && e.getMessage().startsWith(\"No mount point for\")) {\n    // path outside mount table: fall back to default nameservice root or fail with context\n    throw new IllegalArgumentException(\"Path not mounted: \" + src\n        + \". Add a mount entry or enable dfs.federation.router.default.nameservice.enable\", e);\n  }\n  throw e;\n}","preventionTips":["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"],"tags":["hdfs","router","federation","mount-table","path-resolution","getenclosingroot"],"backgroundTag":"path-resolution-failed","analyzedSha":"2add9630210752f88ceb1bb74eb65e37bf41da8e","analyzedAt":"2026-08-22T19:55:07.957Z","schemaVersion":2},"datasetVersion":"2026-08-23T01:17:44.959Z"}