{"record":{"id":"ed3f66dbf9b078c6","repo":"apache/hadoop","slug":"can-t-continue-with-getblocklocalpathinfo-author","errorCode":null,"errorMessage":"Can't continue with getBlockLocalPathInfo() authorization. The user {} is not configured in dfs.block.local-path-access.user","messagePattern":"Can't continue with getBlockLocalPathInfo\\(\\) authorization\\. The user (.+?) is not configured in dfs\\.block\\.local-path-access\\.user","errorType":"exception","errorClass":"AccessControlException","httpStatus":null,"severity":"error","filePath":"hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/DataNode.java","lineNumber":2429,"sourceCode":"\n  /** Ensure the authentication method is kerberos */\n  private void checkKerberosAuthMethod(String msg) throws IOException {\n    // User invoking the call must be same as the datanode user\n    if (!UserGroupInformation.isSecurityEnabled()) {\n      return;\n    }\n    if (UserGroupInformation.getCurrentUser().getAuthenticationMethod() != \n        AuthenticationMethod.KERBEROS) {\n      throw new AccessControlException(\"Error in \" + msg\n          + \"Only kerberos based authentication is allowed.\");\n    }\n  }\n  \n  private void checkBlockLocalPathAccess() throws IOException {\n    checkKerberosAuthMethod(\"getBlockLocalPathInfo()\");\n    String currentUser = UserGroupInformation.getCurrentUser().getShortUserName();\n    if (!usersWithLocalPathAccess.contains(currentUser)) {\n      throw new AccessControlException(\n          \"Can't continue with getBlockLocalPathInfo() \"\n              + \"authorization. The user \" + currentUser\n              + \" is not configured in \"\n              + DFSConfigKeys.DFS_BLOCK_LOCAL_PATH_ACCESS_USER_KEY);\n    }\n  }\n\n  public long getMaxNumberOfBlocksToLog() {\n    return maxNumberOfBlocksToLog;\n  }\n\n  @Override\n  public BlockLocalPathInfo getBlockLocalPathInfo(ExtendedBlock block,\n      Token<BlockTokenIdentifier> token) throws IOException {\n    checkBlockLocalPathAccess();\n    checkBlockToken(block, token, BlockTokenIdentifier.AccessMode.READ);\n    checkStorageState(\"getBlockLocalPathInfo\");\n    BlockLocalPathInfo info = data.getBlockLocalPathInfo(block);","sourceCodeStart":2411,"sourceCodeEnd":2447,"githubUrl":"https://github.com/apache/hadoop/blob/2add9630210752f88ceb1bb74eb65e37bf41da8e/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/DataNode.java#L2411-L2447","documentation":"Error \"Can't continue with getBlockLocalPathInfo() authorization. The user {} is not configured in dfs.block.local-path-access.user\" thrown in apache/hadoop.","triggerScenarios":"A client attempts getBlockLocalPathInfo (short-circuit read) as a user not listed in dfs.block.local-path-access.user.","commonSituations":"A user requested short-circuit local block paths without being listed in dfs.block.local-path-access.user. Add the user to that config on the DataNode.","solutions":["Add the user to dfs.block.local-path-access.user in hdfs-site.xml and restart/refresh the DataNode.","Alternatively, disable short-circuit local reads (dfs.client.read.shortcircuit=false) on the client so it reads over the standard DataTransferProtocol."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"2add9630210752f88ceb1bb74eb65e37bf41da8e","analyzedAt":"2026-08-22T19:55:07.957Z","schemaVersion":2},"datasetVersion":"2026-08-22T20:17:22.307Z"}