{"record":{"id":"2f664984d4c8a0ea","repo":"apache/hadoop","slug":"can-t-continue-since-none-or-more-than-one-blockto","errorCode":null,"errorMessage":"Can't continue since none or more than one BlockTokenIdentifier is found.","messagePattern":"Can't continue since none or more than one BlockTokenIdentifier is found\\.","errorType":"exception","errorClass":"IOException","httpStatus":null,"severity":"error","filePath":"hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/DataNode.java","lineNumber":3604,"sourceCode":"    checkReadAccess(block);\n    return data.getReplicaVisibleLength(block);\n  }\n\n  private void checkReadAccess(final ExtendedBlock block) throws IOException {\n    // Make sure this node has registered for the block pool.\n    try {\n      getDNRegistrationForBP(block.getBlockPoolId());\n    } catch (IOException e) {\n      // if it has not registered with the NN, throw an exception back.\n      throw new org.apache.hadoop.ipc.RetriableException(\n          \"Datanode not registered. Try again later.\");\n    }\n\n    if (isBlockTokenEnabled) {\n      Set<TokenIdentifier> tokenIds = UserGroupInformation.getCurrentUser()\n          .getTokenIdentifiers();\n      if (tokenIds.size() != 1) {\n        throw new IOException(\"Can't continue since none or more than one \"\n            + \"BlockTokenIdentifier is found.\");\n      }\n      for (TokenIdentifier tokenId : tokenIds) {\n        BlockTokenIdentifier id = (BlockTokenIdentifier) tokenId;\n        LOG.debug(\"BlockTokenIdentifier: {}\", id);\n        blockPoolTokenSecretManager.checkAccess(id, null, block,\n            BlockTokenIdentifier.AccessMode.READ, null, null);\n      }\n    }\n  }\n\n  /**\n   * Transfer a replica to the datanode targets.\n   * @param b the block to transfer.\n   *          The corresponding replica must be an RBW or a Finalized.\n   *          Its GS and numBytes will be set to\n   *          the stored GS and the visible length. \n   * @param targets targets to transfer the block to","sourceCodeStart":3586,"sourceCodeEnd":3622,"githubUrl":"https://github.com/apache/hadoop/blob/2add9630210752f88ceb1bb74eb65e37bf41da8e/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/DataNode.java#L3586-L3622","documentation":"Error \"Can't continue since none or more than one BlockTokenIdentifier is found.\" thrown in apache/hadoop.","triggerScenarios":"During token-based connection setup, the DataNode finds zero or more than one BlockTokenIdentifier among the connection's tokens.","commonSituations":"Zero or multiple BlockTokenIdentifiers were presented where exactly one is required. Indicates a malformed client request; upgrade mismatched client versions.","solutions":["Ensure the client sends exactly one block token for the operation; regenerate the access token via the NameNode if the connection carried zero or multiple BlockTokenIdentifiers.","Check for custom token serialization code or proxies that duplicate/strip tokens on the data transfer connection."],"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-23T01:17:44.959Z"}