{"record":{"id":"a8792e2ed5b287dc","repo":"apache/hadoop","slug":"sps-service-mode-is-so-external-sps-service-is","errorCode":null,"errorMessage":"SPS service mode is {}, so external SPS service is not allowed to fetch the path Ids","messagePattern":"SPS service mode is (.+?), so external SPS service is not allowed to fetch the path Ids","errorType":"exception","errorClass":"IOException","httpStatus":null,"severity":"error","filePath":"hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/NameNodeRpcServer.java","lineNumber":2689,"sourceCode":"  @Override\n  public Long getNextSPSPath() throws IOException {\n    checkNNStartup();\n    String operationName = \"getNextSPSPath\";\n    namesystem.checkSuperuserPrivilege(operationName);\n    if (nn.isStandbyState()) {\n      throw new StandbyException(\"Not supported by Standby Namenode.\");\n    }\n    // Check that SPS is enabled externally\n    StoragePolicySatisfyManager spsMgr =\n        namesystem.getBlockManager().getSPSManager();\n    StoragePolicySatisfierMode spsMode = (spsMgr != null ? spsMgr.getMode()\n        : StoragePolicySatisfierMode.NONE);\n    if (spsMode != StoragePolicySatisfierMode.EXTERNAL) {\n      if (LOG.isDebugEnabled()) {\n        LOG.debug(\"SPS service mode is {}, so external SPS service is \"\n            + \"not allowed to fetch the path Ids\", spsMode);\n      }\n      throw new IOException(\"SPS service mode is \" + spsMode + \", so \"\n          + \"external SPS service is not allowed to fetch the path Ids\");\n    }\n    return namesystem.getBlockManager().getSPSManager().getNextPathId();\n  }\n\n  @Override // ClientProtocol\n  public Path getEnclosingRoot(String src)\n      throws IOException {\n    checkNNStartup();\n    return namesystem.getEnclosingRoot(src);\n  }\n}\n","sourceCodeStart":2671,"sourceCodeEnd":2702,"githubUrl":"https://github.com/apache/hadoop/blob/2add9630210752f88ceb1bb74eb65e37bf41da8e/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/NameNodeRpcServer.java#L2671-L2702","documentation":"Error \"SPS service mode is {}, so external SPS service is not allowed to fetch the path Ids\" thrown in apache/hadoop.","triggerScenarios":"An external SPS service tries to fetch path IDs while the NameNode runs internal or disabled SPS mode.","commonSituations":"Running 'hdfs sps' external daemon against a NameNode configured with internal satisfier mode.","solutions":["Set dfs.storage.policy.satisfier.mode to external before running an external Storage Policy Satisfier service, or use the internal mode."],"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"}