Cassandra cannot create a table today. The following error message is displayed:
Connected to: "Sentiment Cluster" on localhost/9160Authenticated to keyspace: sentimentLine 2 => Cluster schema does not yet agreecreate DB error: 20120322
Frequent tracing and feedback:
Http://wiki.apache.org/cassandra/FAQ#schema_disagreement
Cassandra schema updates assume
That schema changes are done-at-a-time. if you make multiple changes at the same time, you can cause some nodes to end up with a different schema, than others. (before 0.7.6, this can also be caused by cluster system clocks being substantially out
Of sync with each other .)
To fix schema disagreements, You need to force the disagreeing nodes to rebuild their schema. Here's how:
Open the Cassandra-CLI and run: 'connect localhost/9160; ', then' describe cluster;'. You'll see something like this:
[default@unknown] describe cluster;Cluster Information: Snitch: org.apache.cassandra.locator.SimpleSnitch Partitioner: org.apache.cassandra.dht.RandomPartitioner Schema versions:75eece10-bf48-11e0-0000-4d205df954a7: [192.168.1.9, 192.168.1.25]5a54ebd0-bd90-11e0-0000-9510c23fceff: [192.168.1.27]
Note which schemas are in the minority and mark down those IPS -- in the above example, 192.168.1.27. login to each of those machines and stop the Cassandra service/process by running 'sudo Service
Cassandra stop 'or 'Kill <pid> '. remove the schema * and migration * sstables inside of your system keyspace (/var/lib/Cassandra/data/system, if you're using the defaults ).
After starting Cassandra again, this node will notice the missing information and pull in the correct schema from one of the other nodes.
To confirm everything is on the same schema, verify that 'describe cluster; 'Only returns one schema version.