{"record":{"id":"0715ca4f5f35c112","repo":"apache/hadoop","slug":"disabled-nameservice-state-store-is-not-available","errorCode":null,"errorMessage":"Disabled Nameservice state store is not available.","messagePattern":"Disabled Nameservice state store is not available\\.","errorType":"exception","errorClass":"IOException","httpStatus":null,"severity":"error","filePath":"hadoop-hdfs-project/hadoop-hdfs-rbf/src/main/java/org/apache/hadoop/hdfs/server/federation/router/RouterAdminServer.java","lineNumber":262,"sourceCode":"\n  private MountTableStore getMountTableStore() throws IOException {\n    if (this.mountTableStore == null) {\n      this.mountTableStore = router.getStateStore().getRegisteredRecordStore(\n          MountTableStore.class);\n      if (this.mountTableStore == null) {\n        throw new IOException(\"Mount table state store is not available.\");\n      }\n    }\n    return this.mountTableStore;\n  }\n\n  private DisabledNameserviceStore getDisabledNameserviceStore()\n      throws IOException {\n    if (this.disabledStore == null) {\n      this.disabledStore = router.getStateStore().getRegisteredRecordStore(\n          DisabledNameserviceStore.class);\n      if (this.disabledStore == null) {\n        throw new IOException(\n            \"Disabled Nameservice state store is not available.\");\n      }\n    }\n    return this.disabledStore;\n  }\n\n  /**\n   * Get the RPC address of the admin service.\n   * @return Administration service RPC address.\n   */\n  public InetSocketAddress getRpcAddress() {\n    return this.adminAddress;\n  }\n\n  void checkSuperuserPrivilege() throws AccessControlException {\n    RouterPermissionChecker pc = RouterAdminServer.getPermissionChecker();\n    if (pc != null) {\n      pc.checkSuperuserPrivilege();","sourceCodeStart":244,"sourceCodeEnd":280,"githubUrl":"https://github.com/apache/hadoop/blob/2add9630210752f88ceb1bb74eb65e37bf41da8e/hadoop-hdfs-project/hadoop-hdfs-rbf/src/main/java/org/apache/hadoop/hdfs/server/federation/router/RouterAdminServer.java#L244-L280","documentation":"RouterAdminServer.getDisabledNameserviceStore() lazily resolves DisabledNameserviceStore from the State Store and throws when it is not registered. This store backs 'hdfs dsadmin -disableNameservice/-enableNameservice' (manual failover of namespaces). Missing registration means the State Store service did not initialize its record stores: store disabled in config, driver failure, or startup race.","triggerScenarios":"Running hdfs dsadmin -disableNameservice <ns> or -enableNameservice <ns> when the state store is down or dfs.federation.router.store.enable=false; admin calls issued during Router startup before StateStoreService.serviceInit registers DisabledNameserviceStoreImpl.","commonSituations":"Operator disables a nameservice during an incident while the state store backend (ZK/DB) is also impaired; state store driver config lost during upgrade; env where only the mount table store was verified but the driver failed registering other stores.","solutions":["Verify State Store health in the Router JMX/log (StateStoreService 'initialized') and fix backend connectivity","Enable and configure the state store (dfs.federation.router.store.enable=true plus driver settings) and restart the Router","Re-run the dsadmin command once the log shows record stores registered"],"exampleFix":null,"handlingStrategy":"retry","validationCode":"StateStoreService ss = router.getStateStore();\nif (ss == null || ss.getRegisteredRecordStore(DisabledNameserviceStore.class) == null) {\n  throw new IllegalStateException(\"State Store not ready for nameservice enable/disable\");\n}","typeGuard":null,"tryCatchPattern":"try {\n  routerAdmin.disableNameservice(request);\n} catch (IOException e) {\n  if (\"Disabled Nameservice state store is not available.\".equals(e.getMessage())) {\n    // state store impaired: restore backend, wait for StateStoreService init, retry\n  } else { throw e; }\n}","preventionTips":["Verify state store health before running nameservice failover runbooks","Keep state store driver config version-controlled and consistent across Routers"],"tags":["hdfs","router-based-federation","state-store","nameservice","admin","failover"],"backgroundTag":"dependency-unavailable","analyzedSha":"2add9630210752f88ceb1bb74eb65e37bf41da8e","analyzedAt":"2026-08-22T19:55:07.957Z","schemaVersion":2},"datasetVersion":"2026-08-22T20:17:22.307Z"}