apache/hadoop · error · IOException

The block pool is still running. First do a refreshNamenodes

Error message

The block pool is still running. First do a refreshNamenodes to shutdown the block pool service

What it means

Error "The block pool is still running. First do a refreshNamenodes to shutdown the block pool service" thrown in apache/hadoop.

Source

Thrown at hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/DataNode.java:3854

  }

  @Override // ClientDatanodeProtocol
  public void refreshNamenodes() throws IOException {
    checkSuperuserPrivilege();
    setConf(new Configuration());
    refreshNamenodes(getConf());
  }
  
  @Override // ClientDatanodeProtocol
  public void deleteBlockPool(String blockPoolId, boolean force)
      throws IOException {
    checkSuperuserPrivilege();
    LOG.info("deleteBlockPool command received for block pool {}, " +
        "force={}", blockPoolId, force);
    if (blockPoolManager.get(blockPoolId) != null) {
      LOG.warn("The block pool {} is still running, cannot be deleted.",
          blockPoolId);
      throw new IOException(
          "The block pool is still running. First do a refreshNamenodes to " +
          "shutdown the block pool service");
    }
    checkStorageState("deleteBlockPool");
    data.deleteBlockPool(blockPoolId, force);
  }

  /**
   * Check if storage has been initialized.
   * @param methodName caller name
   * @throws IOException throw IOException if not yet initialized.
   */
  private void checkStorageState(String methodName) throws IOException {
    if (data == null) {
      String message = "Storage not yet initialized for " + methodName;
      LOG.debug(message);
      throw new IOException(message);
    }

View on GitHub (pinned to 2add963021)

Solutions

  1. Run 'hdfs dfsadmin -refreshNamenodes <datanode_host:port>' to shut down the block pool service, then retry the operation (e.g., shutdownDatanode or deleteBlockPool).
  2. Do not forcibly delete block pool storage while the BPOfferService is active.

When it happens

Trigger: Attempting to remove/shutdown a block pool's storage while its BPOfferService thread is still running.

Common situations: An admin operation tried to remove a block pool whose service thread is still running. Run refreshNamenodes first to stop the block pool service.


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