apache/hadoop · error · IOException

processCacheReport from dead or unregistered datanode…

Error message

processCacheReport from dead or unregistered datanode: datanode

What it means

processCacheReport: the datanode that sent the cache report could not be resolved via DatanodeManager (null), meaning it is dead or unregistered; the report is discarded to prevent spoofing/state corruption.

Solutions

  1. Check why the DataNode is marked dead or unregistered (network partition, crash) and bring it back into the cluster.
  2. Usually benign during DataNode restarts; ensure the DataNode re-registers with the NameNode.
Defensive patterns

Strategy: type-guard

When it happens

Trigger: Cache report received from a DataNode that is dead or not registered with the NameNode.

Common situations: See trigger scenarios.


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

Appendix: source

Thrown at hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/CacheManager.java:1019

      }
    }
  }

  public final void processCacheReport(final DatanodeID datanodeID,
      final List<Long> blockIds) throws IOException {
    if (!enabled) {
      LOG.debug("Ignoring cache report from {} because {} = false. number of blocks: {}",
          datanodeID, DFS_NAMENODE_CACHING_ENABLED_KEY, blockIds.size());
      return;
    }
    namesystem.writeLock(RwLockMode.BM);
    final long startTime = Time.monotonicNow();
    final long endTime;
    try {
      final DatanodeDescriptor datanode = 
          blockManager.getDatanodeManager().getDatanode(datanodeID);
      if (datanode == null || !datanode.isRegistered()) {
        throw new IOException(
            "processCacheReport from dead or unregistered datanode: " +
            datanode);
      }
      processCacheReportImpl(datanode, blockIds);
    } finally {
      endTime = Time.monotonicNow();
      namesystem.writeUnlock(RwLockMode.BM, "processCacheReport");
    }

    // Log the block report processing stats from Namenode perspective
    final NameNodeMetrics metrics = NameNode.getNameNodeMetrics();
    if (metrics != null) {
      metrics.addCacheBlockReport((int) (endTime - startTime));
    }
    LOG.debug("Processed cache report from {}, blocks: {}, processing time: {} msecs",
        datanodeID, blockIds.size(), (endTime - startTime));
  }

View on GitHub (pinned to 2add963021)