apache/cassandra · error · InvalidRequestException
'Get CIDR groups for IP' operation not supported by %s
Error message
'Get CIDR groups for IP' operation not supported by %s
What it means
Thrown by CreateViewStatement.apply when the keyspace containing (or targeted for) the materialized view does not exist in the cluster schema. Like other schema DDL, the view statement resolves its parent keyspace from ClusterMetadata and rejects the request if it is absent.
Source
Thrown at src/java/org/apache/cassandra/auth/AllowAllCIDRAuthorizer.java:64
return false;
}
@Override
public boolean invalidateCidrPermissionsCache(String roleName)
{
throw new InvalidRequestException("Invalidate CIDR permissions cache operation not supported by " + getClass().getSimpleName());
}
@Override
public void loadCidrGroupsCache()
{
throw new InvalidRequestException("Load CIDR groups cache operation not supported by " + getClass().getSimpleName());
}
@Override
public Set<String> lookupCidrGroupsForIp(InetAddress ip)
{
throw new InvalidRequestException("'Get CIDR groups for IP' operation not supported by " + getClass().getSimpleName());
}
@Override
public boolean hasAccessFromIp(RoleResource role, InetAddress ipAddress)
{
// Allow all accesses
return true;
}
}
View on GitHub (pinned to 88fd0f6a0e)
Solutions
- Verify the keyspace exists via 'DESCRIBE KEYSPACES' or system_schema.keyspaces.
- Create the keyspace (and base table) before the materialized view statement.
- Fix the keyspace name/casing in the CREATE MATERIALIZED VIEW statement.
- Confirm the client is connected to the intended cluster.
Example fix
// before
CREATE MATERIALIZED VIEW ordervals.mv AS SELECT ...
// after
CREATE KEYSPACE IF NOT EXISTS ordervals WITH replication = {'class': 'SimpleStrategy', 'replication_factor': 3};
CREATE MATERIALIZED VIEW ordervals.mv AS SELECT ... Defensive patterns
Strategy: validation
Validate before calling
if (session.execute("SELECT keyspace_name FROM system_schema.keyspaces WHERE keyspace_name = ?", ks).one() == null)
throw new IllegalStateException("Keyspace missing: " + ks); Type guard
boolean keyspaceExists(Session s, String ks) {
return s.execute("SELECT keyspace_name FROM system_schema.keyspaces WHERE keyspace_name = ?", ks).one() != null;
} Try / catch
try {
session.execute(createMvStmt);
} catch (InvalidQueryException e) {
if (e.getMessage().contains("Keyspace") && e.getMessage().contains("doesn't exist")) { createKeyspace(); retry(createMvStmt); }
else throw e;
} Prevention
- Run CREATE KEYSPACE and CREATE TABLE steps before MV creation in ordered migrations.
- Use fully-qualified, consistently-cased keyspace names.
- Verify the target cluster/environment before deploying DDL.
When it happens
Trigger: Executing 'CREATE MATERIALIZED VIEW ks.mv AS SELECT ... FROM ks.base ...' where ks does not exist, was dropped, or the name does not case-sensitively match an existing keyspace.
Common situations: Typos in the keyspace qualifier; running DDL against the wrong environment/cluster; a concurrent DROP KEYSPACE; migrations assuming the keyspace was created in an earlier step that failed.
Understand the failure class
Background: 'Could not be found', 'does not exist', 'not found in database': the resource-not-found family when an ID, slug, key, or URI lookup comes back empty — this error's family across 20 libraries.
Related errors
- ACCESS TO DATACENTERS operations not supported by AllowAllNe
- category %s not found in %s
- Remote configuration of auth caches is disabled
- frozen<> is only allowed on collections, tuples, and user-de
- System keyspace '%s' is not user-modifiable
AI-assisted analysis of apache/cassandra@88fd0f6a0e (2026-09-10).
Data as JSON: /api/errors/35a0c889174ef166.
Report an issue: GitHub.