{"record":{"id":"d792aed53341d31d","repo":"apache/cassandra","slug":"there-is-no-ring-for-the-keyspace","errorCode":null,"errorMessage":"There is no ring for the keyspace: ","messagePattern":"There is no ring for the keyspace: ","errorType":"exception","errorClass":"InvalidRequestException","httpStatus":null,"severity":"error","filePath":"src/java/org/apache/cassandra/service/StorageService.java","lineNumber":1998,"sourceCode":"     *\n     * @param keyspace The keyspace to fetch information about\n     *\n     * @return a List of TokenRange(s) for the given keyspace\n     *\n     * @throws InvalidRequestException if there is no ring information available about keyspace\n     */\n    public List<TokenRange> describeRing(String keyspace) throws InvalidRequestException\n    {\n        return describeRing(keyspace, false, false);\n    }\n\n    private List<TokenRange> describeRing(String keyspace, boolean includeOnlyLocalDC, boolean withPort) throws InvalidRequestException\n    {\n        if (!Schema.instance.getKeyspaces().contains(keyspace))\n            throw new InvalidRequestException(\"No such keyspace: \" + keyspace);\n\n        if (keyspace == null || Keyspace.open(keyspace).getReplicationStrategy() instanceof LocalStrategy)\n            throw new InvalidRequestException(\"There is no ring for the keyspace: \" + keyspace);\n\n        List<TokenRange> ranges = new ArrayList<>();\n        Token.TokenFactory tf = getTokenFactory();\n\n        EndpointsByRange rangeToAddressMap =\n                includeOnlyLocalDC\n                        ? getRangeToAddressMapInLocalDC(keyspace)\n                        : getRangeToAddressMap(keyspace);\n\n        for (Map.Entry<Range<Token>, EndpointsForRange> entry : rangeToAddressMap.entrySet())\n            ranges.add(TokenRange.create(tf, entry.getKey(), ImmutableList.copyOf(entry.getValue().endpoints()), withPort));\n\n        return ranges;\n    }\n\n    public Map<String, String> getTokenToEndpointMap()\n    {\n        return getTokenToEndpointMap(false);","sourceCodeStart":1980,"sourceCodeEnd":2016,"githubUrl":"https://github.com/apache/cassandra/blob/88fd0f6a0eaed8943f05ac9e8f947882b8ddc8f1/src/java/org/apache/cassandra/service/StorageService.java#L1980-L2016","documentation":"Thrown by StorageService.describeRing when the keyspace exists but uses LocalStrategy (system keyspaces such as 'system'). LocalStrategy keyspaces have no token ring - they are replicated only to the local node - so describing a ring for them is meaningless and rejected with InvalidRequestException.","triggerScenarios":"Calling `nodetool describering system` (or another LocalStrategy keyspace like system_schema) or invoking describeRing JMX for such a keyspace.","commonSituations":"Scripts iterating over all keyspaces including system ones; operators debugging system keyspace data placement; monitoring tooling not filtering out system keyspaces.","solutions":["Only request ring descriptions for user keyspaces with NetworkTopologyStrategy or SimpleStrategy","Filter out LocalStrategy keyspaces in scripts (e.g. skip names starting with 'system')","Check the keyspace's replication strategy in cqlsh (DESCRIBE KEYSPACE) before calling describering","For system keyspace data location questions, inspect token ownership of regular keyspaces instead"],"exampleFix":"// before\nnodetool describering system   # LocalStrategy\n// after\n# iterate user keyspaces only\nfor ks in $(cqlsh -e 'DESCRIBE KEYSPACES;' | grep -v '^system'); do nodetool describering \"$ks\"; done","handlingStrategy":"validation","validationCode":"// Skip LocalStrategy (system) keyspaces before describering\nif (keyspace.startsWith(\"system\"))\n    return; // system keyspaces have no token ring\ndescribeRing(keyspace);","typeGuard":"boolean hasRing(String keyspace) {\n    return !keyspace.equals(\"system\") && !keyspace.startsWith(\"system_\");\n}","tryCatchPattern":"try {\n    String ring = ssProxy.describeRing(keyspace);\n} catch (InvalidRequestException e) {\n    if (e.getMessage() != null && e.getMessage().startsWith(\"There is no ring\"))\n        log.debug(\"{} uses LocalStrategy; skipping ring description\", keyspace);\n    else throw e;\n}","preventionTips":["Filter out system keyspaces in scripts that iterate all keyspaces","Check the replication strategy (DESCRIBE KEYSPACE) before requesting ring info","Only user keyspaces with Simple/NetworkTopologyStrategy have a ring"],"tags":["keyspace","local-strategy","ring","nodetool","system-keyspace"],"backgroundTag":"unsupported-operation","analyzedSha":"88fd0f6a0eaed8943f05ac9e8f947882b8ddc8f1","analyzedAt":"2026-09-10T07:29:22.284Z","contentChangedAt":"2026-09-10T07:29:22.284Z","schemaVersion":2},"datasetVersion":"2026-09-14T16:17:12.679Z"}