{"record":{"id":"8aeaebe9dfa3299e","repo":"apache/cassandra","slug":"no-such-keyspace","errorCode":null,"errorMessage":"No such keyspace: ","messagePattern":"No such keyspace: ","errorType":"exception","errorClass":"InvalidRequestException","httpStatus":null,"severity":"error","filePath":"src/java/org/apache/cassandra/service/StorageService.java","lineNumber":1995,"sourceCode":"\n    /**\n     * The TokenRange for a given keyspace.\n     *\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","sourceCodeStart":1977,"sourceCodeEnd":2013,"githubUrl":"https://github.com/apache/cassandra/blob/88fd0f6a0eaed8943f05ac9e8f947882b8ddc8f1/src/java/org/apache/cassandra/service/StorageService.java#L1977-L2013","documentation":"Thrown by StorageService.describeRing when the requested keyspace does not exist in the local schema. The ring-description API (used by nodetool describering and JMX) requires an existing keyspace to compute token ranges for, and throws InvalidRequestException for unknown names.","triggerScenarios":"Calling `nodetool describering <keyspace>` or the JMX describeRing method with a misspelled or dropped keyspace; calling before schema is fully propagated to the node.","commonSituations":"Typo in keyspace name (case sensitivity with quoted identifiers); keyspace dropped concurrently; schema disagreement - the node hasn't yet received the keyspace's schema; tooling using an old config value.","solutions":["List existing keyspaces (`nodetool describecluster`, cqlsh DESCRIBE KEYSPACES) and correct the name","Check case sensitivity - quoted keyspace names are case-sensitive","Run `nodetool tpstats`/schema agreement check; wait for schema to agree if the keyspace was just created","Verify you are querying the intended cluster"],"exampleFix":"// before\nnodetool describering KeySpace1   # typo / dropped\n// after\ncqlsh -e 'DESCRIBE KEYSPACES;'\nnodetool describering keyspace1   # exact existing name","handlingStrategy":"validation","validationCode":"// Verify keyspace exists before describering\nList<String> keyspaces = /* from cqlsh DESCRIBE KEYSPACES or Schema proxy */;\nif (!keyspaces.contains(keyspace)) throw new IllegalArgumentException(\"No such keyspace: \" + keyspace);","typeGuard":null,"tryCatchPattern":"try {\n    String ring = ssProxy.describeRing(keyspace);\n} catch (InvalidRequestException e) {\n    if (e.getMessage() != null && e.getMessage().startsWith(\"No such keyspace\"))\n        log.warn(\"Keyspace {} missing - check name/case and schema agreement\", keyspace);\n    else throw e;\n}","preventionTips":["Copy keyspace names from DESCRIBE KEYSPACES to avoid typos and case errors","Wait for schema agreement after creating keyspaces before describing rings","Keep tooling config in sync with dropped/renamed keyspaces"],"tags":["keyspace","schema","nodetool","invalid-request"],"backgroundTag":"resource-not-found","analyzedSha":"88fd0f6a0eaed8943f05ac9e8f947882b8ddc8f1","analyzedAt":"2026-09-10T07:29:22.284Z","contentChangedAt":"2026-09-10T07:29:22.284Z","schemaVersion":2},"datasetVersion":"2026-09-14T21:17:11.552Z"}