{"record":{"id":"9f5f458f10f3ad48","repo":"apache/cassandra","slug":"unknown-keyspace-ksname","errorCode":null,"errorMessage":"Unknown keyspace '{ksName}'","messagePattern":"Unknown keyspace '(.+?)'","errorType":"validation","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"src/java/org/apache/cassandra/service/StorageService.java","lineNumber":5610,"sourceCode":"        logger.info(\"paxos repair {} via jmx\", enabled ? \"enabled\" : \"disabled\");\n    }\n\n    public boolean getPaxosDcLocalCommitEnabled()\n    {\n        return PaxosCommit.getEnableDcLocalCommit();\n    }\n\n    public void setPaxosDcLocalCommitEnabled(boolean enabled)\n    {\n        PaxosCommit.setEnableDcLocalCommit(enabled);\n        logger.info(\"paxos dc local commit {} via jmx\", enabled ? \"enabled\" : \"disabled\");\n    }\n\n    public String getPaxosBallotLowBound(String ksName, String tblName, String key)\n    {\n        Keyspace keyspace = Keyspace.open(ksName);\n        if (keyspace == null)\n            throw new IllegalArgumentException(\"Unknown keyspace '\" + ksName + \"'\");\n\n        ColumnFamilyStore cfs = keyspace.getColumnFamilyStore(tblName);\n        if (cfs == null)\n            throw new IllegalArgumentException(\"Unknown table '\" + tblName + \"' in keyspace '\" + ksName + \"'\");\n\n        TableMetadata table = cfs.metadata.get();\n        DecoratedKey dk = table.partitioner.decorateKey(table.partitionKeyType.fromString(key));\n        return cfs.getPaxosRepairHistory().ballotForToken(dk.getToken()).toString();\n    }\n\n    public Long getRepairRpcTimeout()\n    {\n        return DatabaseDescriptor.getRepairRpcTimeout(MILLISECONDS);\n    }\n\n    public void setRepairRpcTimeout(Long timeoutInMillis)\n    {\n        checkState(timeoutInMillis > 0);","sourceCodeStart":5592,"sourceCodeEnd":5628,"githubUrl":"https://github.com/apache/cassandra/blob/88fd0f6a0eaed8943f05ac9e8f947882b8ddc8f1/src/java/org/apache/cassandra/service/StorageService.java#L5592-L5628","documentation":"Thrown by StorageService.getPaxosBallotLowBound when Keyspace.open(ksName) returns null, meaning no keyspace with that name exists on this node. It is an IllegalArgumentException signaling a bad JMX/nodetool argument.","triggerScenarios":"Calling getPaxosBallotLowBound(ksName, tblName, key) (directly or via nodetool/JMX) with a keyspace name that is not present in Schema.instance, e.g. a typo or a keyspace dropped before the call.","commonSituations":"Typo in keyspace name; querying a keyspace that exists only on other nodes; case-sensitivity mistakes (Cassandra keyspaces are case-sensitive unless quoted); keyspace dropped between listing and querying.","solutions":["Verify the keyspace name with `nodetool describecluster` or by running `DESCRIBE KEYSPACES` in cqlsh and correct the argument.","Check case sensitivity: use the exact keyspace name (lowercase unless it was created quoted).","Ensure the keyspace exists on the node being queried (schema agreement); recreate or repair schema if it is missing."],"exampleFix":"// before\nString ballot = ssProxy.getPaxosBallotLowBound(\"MyKS\", \"tbl\", key); // throws if keyspace is 'myks'\n// after\nif (Schema.instance.isValidKeyspace(\"myks\")) {\n    String ballot = ssProxy.getPaxosBallotLowBound(\"myks\", \"tbl\", key);\n}","handlingStrategy":"validation","validationCode":"if (!StorageProxy.getNaturalEndpoints(ksName, /* any token */).isEmpty() == false) ... // better:\nif (Schema.instance.getKeyspaceMetadata(ksName) == null) throw new IllegalArgumentException(\"keyspace does not exist: \" + ksName);","typeGuard":null,"tryCatchPattern":"try { return ssProxy.getPaxosBallotLowBound(ksName, tblName, key); }\ncatch (IllegalArgumentException e) { if (e.getMessage().startsWith(\"Unknown keyspace\")) { /* resolve keyspace list */ } throw e; }","preventionTips":["Verify keyspace names with DESCRIBE KEYSPACES before JMX calls","Remember identifiers are case-sensitive when created quoted","Confirm schema agreement across nodes before remote JMX calls"],"tags":["cassandra","keyspace-not-found","jmx","invalid-argument"],"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-14T16:17:12.679Z"}