apache/hadoop · error · IOException

Disabled Nameservice state store is not available.

Error message

Disabled Nameservice state store is not available.

What it means

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.

Source

Thrown at hadoop-hdfs-project/hadoop-hdfs-rbf/src/main/java/org/apache/hadoop/hdfs/server/federation/router/RouterAdminServer.java:262

  private MountTableStore getMountTableStore() throws IOException {
    if (this.mountTableStore == null) {
      this.mountTableStore = router.getStateStore().getRegisteredRecordStore(
          MountTableStore.class);
      if (this.mountTableStore == null) {
        throw new IOException("Mount table state store is not available.");
      }
    }
    return this.mountTableStore;
  }

  private DisabledNameserviceStore getDisabledNameserviceStore()
      throws IOException {
    if (this.disabledStore == null) {
      this.disabledStore = router.getStateStore().getRegisteredRecordStore(
          DisabledNameserviceStore.class);
      if (this.disabledStore == null) {
        throw new IOException(
            "Disabled Nameservice state store is not available.");
      }
    }
    return this.disabledStore;
  }

  /**
   * Get the RPC address of the admin service.
   * @return Administration service RPC address.
   */
  public InetSocketAddress getRpcAddress() {
    return this.adminAddress;
  }

  void checkSuperuserPrivilege() throws AccessControlException {
    RouterPermissionChecker pc = RouterAdminServer.getPermissionChecker();
    if (pc != null) {
      pc.checkSuperuserPrivilege();

View on GitHub (pinned to 2add963021)

Solutions

  1. Verify State Store health in the Router JMX/log (StateStoreService 'initialized') and fix backend connectivity
  2. Enable and configure the state store (dfs.federation.router.store.enable=true plus driver settings) and restart the Router
  3. Re-run the dsadmin command once the log shows record stores registered
Defensive patterns

Strategy: retry

Validate before calling

StateStoreService ss = router.getStateStore();
if (ss == null || ss.getRegisteredRecordStore(DisabledNameserviceStore.class) == null) {
  throw new IllegalStateException("State Store not ready for nameservice enable/disable");
}

Try / catch

try {
  routerAdmin.disableNameservice(request);
} catch (IOException e) {
  if ("Disabled Nameservice state store is not available.".equals(e.getMessage())) {
    // state store impaired: restore backend, wait for StateStoreService init, retry
  } else { throw e; }
}

Prevention

When it happens

Trigger: 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.

Common situations: 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.

Related errors


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