apache/cassandra · error · InvalidRequestException
There is no ring for the keyspace:
Error message
There is no ring for the keyspace:
What it means
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.
Source
Thrown at src/java/org/apache/cassandra/service/StorageService.java:1998
*
* @param keyspace The keyspace to fetch information about
*
* @return a List of TokenRange(s) for the given keyspace
*
* @throws InvalidRequestException if there is no ring information available about keyspace
*/
public List<TokenRange> describeRing(String keyspace) throws InvalidRequestException
{
return describeRing(keyspace, false, false);
}
private List<TokenRange> describeRing(String keyspace, boolean includeOnlyLocalDC, boolean withPort) throws InvalidRequestException
{
if (!Schema.instance.getKeyspaces().contains(keyspace))
throw new InvalidRequestException("No such keyspace: " + keyspace);
if (keyspace == null || Keyspace.open(keyspace).getReplicationStrategy() instanceof LocalStrategy)
throw new InvalidRequestException("There is no ring for the keyspace: " + keyspace);
List<TokenRange> ranges = new ArrayList<>();
Token.TokenFactory tf = getTokenFactory();
EndpointsByRange rangeToAddressMap =
includeOnlyLocalDC
? getRangeToAddressMapInLocalDC(keyspace)
: getRangeToAddressMap(keyspace);
for (Map.Entry<Range<Token>, EndpointsForRange> entry : rangeToAddressMap.entrySet())
ranges.add(TokenRange.create(tf, entry.getKey(), ImmutableList.copyOf(entry.getValue().endpoints()), withPort));
return ranges;
}
public Map<String, String> getTokenToEndpointMap()
{
return getTokenToEndpointMap(false);View on GitHub (pinned to 88fd0f6a0e)
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
Example fix
// before nodetool describering system # LocalStrategy // after # iterate user keyspaces only for ks in $(cqlsh -e 'DESCRIBE KEYSPACES;' | grep -v '^system'); do nodetool describering "$ks"; done
Defensive patterns
Strategy: validation
Validate before calling
// Skip LocalStrategy (system) keyspaces before describering
if (keyspace.startsWith("system"))
return; // system keyspaces have no token ring
describeRing(keyspace); Type guard
boolean hasRing(String keyspace) {
return !keyspace.equals("system") && !keyspace.startsWith("system_");
} Try / catch
try {
String ring = ssProxy.describeRing(keyspace);
} catch (InvalidRequestException e) {
if (e.getMessage() != null && e.getMessage().startsWith("There is no ring"))
log.debug("{} uses LocalStrategy; skipping ring description", keyspace);
else throw e;
} Prevention
- 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
When it happens
Trigger: Calling `nodetool describering system` (or another LocalStrategy keyspace like system_schema) or invoking describeRing JMX for such a keyspace.
Common situations: Scripts iterating over all keyspaces including system ones; operators debugging system keyspace data placement; monitoring tooling not filtering out system keyspaces.
Understand the failure class
Background: UnsupportedOperationException and "is not supported" errors: when a library deliberately refuses a call — this error's family across 30 libraries.
Related errors
- No such keyspace:
- Cleanup of the system keyspace is neither necessary nor wise
- Ownership values for keyspaces with LocalStrategy are meanin
- The keyspace {keyspace}, does not exist
- Keyspace [%s] does not exist.
AI-assisted analysis of apache/cassandra@88fd0f6a0e (2026-09-10).
Data as JSON: /api/errors/d792aed53341d31d.
Report an issue: GitHub.