Failed to create keyspace in cassandra-cli

I have a simple installation of node cassandra (1.1.0) (default settings). Whenever I try to create a key space in cassandra-cli, I get an error: [default @unknown] create key usage tax; org.apache.thrift.transport.TTransportException

In the cassandra server log, the exception is stacktrace: ERROR 12: 15: 04,722 Exception in thread Thread [MigrationStage: 1,5, main]

java.lang.AssertionError at org.apache.cassandra.db.DefsTable.updateKeyspace(DefsTable.java:441) at org.apache.cassandra.db.DefsTable.mergeKeyspaces(DefsTable.java:339) at org.apache.cassandra.db.DefsTable.mergeSchema(DefsTable.java:269) at org.apache.cassandra.service.MigrationManager$1.call(MigrationManager.java:214) 

I tried to delete the content in. / var / lib / cassandra / data and restart the server and my mac, but still end up with the same problem.

+4
source share
2 answers

The following is the flow when adding a keyspace in Cassandra (according to the comments in the Cassandrda source code. Correct me if I am wrong)

1) In the first step, check if new clusters are added.

2) In the second stage, we check if there are any archived temporary key spaces, in this context, that they were previously deleted, but still exist in the low-level scheme as empty keys

3) In the last step, we update the changed key spaces and save the key spaces that they carry later.

When changing Keyspace, it calls the updateKeyspace function, and here it seems that the metadata of the space keys is corrupted, which causes an assertion error.

SO in your case, it may be that you deleted the same key space and tried to recreate the cause of this problem or, as you said, it was a metadata corruption.

+3
source

It looks like the system key space has been corrupted. Delete data files from

  • / var / Library / Cassandra / data
  • / var / Library / Cassandra / commitlog
  • / var / Library / Cassandra / saved_caches

and restarting the cassandra server fixed the problem. (The above directories are defined in $ CASSANDRA_HOME / conf / cassandra.yaml)

+5
source

Source: https://habr.com/ru/post/1415904/


All Articles