apache/hadoop · error · IOException

SPS service mode is , so external SPS service is not…

Error message

SPS service mode is {}, so external SPS service is not allowed to fetch the path Ids

What it means

Thrown by getNextSPSPath when StoragePolicySatisfier is not running in its externally-invokable mode (spsMode != EXTERNAL, e.g. NONE or NATIVE) — an external SPS service is polling for paths but the manager will not hand out path IDs.

Solutions

  1. Set dfs.storage.policy.satisfier.mode to external before running an external Storage Policy Satisfier service, or use the internal mode.
Defensive patterns

Strategy: validation

When it happens

Trigger: An external SPS service tries to fetch path IDs while the NameNode runs internal or disabled SPS mode.

Common situations: Running 'hdfs sps' external daemon against a NameNode configured with internal satisfier mode.


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

Appendix: source

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

  @Override
  public Long getNextSPSPath() throws IOException {
    checkNNStartup();
    String operationName = "getNextSPSPath";
    namesystem.checkSuperuserPrivilege(operationName);
    if (nn.isStandbyState()) {
      throw new StandbyException("Not supported by Standby Namenode.");
    }
    // Check that SPS is enabled externally
    StoragePolicySatisfyManager spsMgr =
        namesystem.getBlockManager().getSPSManager();
    StoragePolicySatisfierMode spsMode = (spsMgr != null ? spsMgr.getMode()
        : StoragePolicySatisfierMode.NONE);
    if (spsMode != StoragePolicySatisfierMode.EXTERNAL) {
      if (LOG.isDebugEnabled()) {
        LOG.debug("SPS service mode is {}, so external SPS service is "
            + "not allowed to fetch the path Ids", spsMode);
      }
      throw new IOException("SPS service mode is " + spsMode + ", so "
          + "external SPS service is not allowed to fetch the path Ids");
    }
    return namesystem.getBlockManager().getSPSManager().getNextPathId();
  }

  @Override // ClientProtocol
  public Path getEnclosingRoot(String src)
      throws IOException {
    checkNNStartup();
    return namesystem.getEnclosingRoot(src);
  }
}

View on GitHub (pinned to 2add963021)