It seems that the table was created twice (concurrently). One with 
b2b1bcd0-5f94-11e6-867a-cb7beeeeb92c id and the other with 
b2b47bf0-5f94-11e6-867a-cb7beeeeb92c.
If you programmatically create tables, it's generally a bad idea, 
especially with multiple clients.

Anyways, execute the following and see what you have in there
select * from system_schema.tables where id = 
b2b47bf0-5f94-11e6-867a-cb7beeeeb92c allow filtering;
select * from system_schema.tables where id = 
b2b1bcd0-5f94-11e6-867a-cb7beeeeb92c allow filtering;

Go to your data directory, and inside your keyspace, you should see your 
table followed by a uuid, how many directories of your table do you have 
there? and what's inside them? do both of them have data, or just one.

-Ali H



From:   Kamal C <kamaltar...@gmail.com>
To:     user@cassandra.apache.org, 
Date:   08/16/2016 11:51 AM
Subject:        Cassandra Exception



Hi all,

    I'm using cassandra-3.7 version, JRE 1.8, centos- 6.5 in standalone 
mode. (only one cassandra node). 
Cassandra clients are in JRE - 1.7. Once in a while, I'm getting the below 
exceptions in the cassandra 
but the data (put / get) is fine. I've searched to find the root-cause but 
unable to conclude it. 


INFO  07:24:53 Create new table: 
org.apache.cassandra.config.CFMetaData@64b34445[cfId=b2b1bcd0-5f94-11e6-867a-cb7beeeeb92c,ksName=fms,cfName=flapalarmcache,flags=[COMPOUND],params=TableParams{comment=,
 
read_repair_chance=0.0, dclocal_read_repair_chance=0.1, 
bloom_filter_fp_chance=0.01, crc_check_chance=1.0, 
gc_grace_seconds=864000, default_time_to_live=0, 
memtable_flush_period_in_ms=0, min_index_interval=128, 
max_index_interval=2048, speculative_retry=99PERCENTILE, caching={'keys' : 
'ALL', 'rows_per_partition' : 'NONE'}, 
compaction=CompactionParams{class=org.apache.cassandra.db.compaction.SizeTieredCompactionStrategy,
 
options={min_threshold=4, max_threshold=32}}, 
compression=org.apache.cassandra.schema.CompressionParams@baaacb37, 
extensions={}},comparator=comparator(),partitionColumns=[[] | 
[alarm]],partitionKeyColumns=[ColumnDefinition{name=key, 
type=org.apache.cassandra.db.marshal.BytesType, kind=PARTITION_KEY, 
position=0}],clusteringColumns=[],keyValidator=org.apache.cassandra.db.marshal.BytesType,columnMetadata=[ColumnDefinition{name=alarm,
 
type=org.apache.cassandra.db.marshal.BytesType, kind=REGULAR, 
position=-1}, ColumnDefinition{name=key, 
type=org.apache.cassandra.db.marshal.BytesType, kind=PARTITION_KEY, 
position=0}],droppedColumns={},triggers=[],indexes=[]]
INFO  07:24:53 Create new table: 
org.apache.cassandra.config.CFMetaData@641c948a[cfId=b2b47bf0-5f94-11e6-867a-cb7beeeeb92c,ksName=fms,cfName=flapalarmcache,flags=[COMPOUND],params=TableParams{comment=,
 
read_repair_chance=0.0, dclocal_read_repair_chance=0.1, 
bloom_filter_fp_chance=0.01, crc_check_chance=1.0, 
gc_grace_seconds=864000, default_time_to_live=0, 
memtable_flush_period_in_ms=0, min_index_interval=128, 
max_index_interval=2048, speculative_retry=99PERCENTILE, caching={'keys' : 
'ALL', 'rows_per_partition' : 'NONE'}, 
compaction=CompactionParams{class=org.apache.cassandra.db.compaction.SizeTieredCompactionStrategy,
 
options={min_threshold=4, max_threshold=32}}, 
compression=org.apache.cassandra.schema.CompressionParams@baaacb37, 
extensions={}},comparator=comparator(),partitionColumns=[[] | 
[alarm]],partitionKeyColumns=[ColumnDefinition{name=key, 
type=org.apache.cassandra.db.marshal.BytesType, kind=PARTITION_KEY, 
position=0}],clusteringColumns=[],keyValidator=org.apache.cassandra.db.marshal.BytesType,columnMetadata=[ColumnDefinition{name=alarm,
 
type=org.apache.cassandra.db.marshal.BytesType, kind=REGULAR, 
position=-1}, ColumnDefinition{name=key, 
type=org.apache.cassandra.db.marshal.BytesType, kind=PARTITION_KEY, 
position=0}],droppedColumns={},triggers=[],indexes=[]]
INFO  07:24:55 Initializing fms.flapalarmcache
ERROR 07:24:57 Exception in thread Thread[MigrationStage:1,5,main]
org.apache.cassandra.exceptions.ConfigurationException: Column family ID 
mismatch (found b2b47bf0-5f94-11e6-867a-cb7beeeeb92c; expected 
b2b1bcd0-5f94-11e6-867a-cb7beeeeb92c)
    at 
org.apache.cassandra.config.CFMetaData.validateCompatibility(CFMetaData.java:789)
 
~[apache-cassandra-3.7.jar:3.7]
    at org.apache.cassandra.config.CFMetaData.apply(CFMetaData.java:749) 
~[apache-cassandra-3.7.jar:3.7]
    at org.apache.cassandra.config.Schema.updateTable(Schema.java:663) 
~[apache-cassandra-3.7.jar:3.7]
    at 
org.apache.cassandra.schema.SchemaKeyspace.updateKeyspace(SchemaKeyspace.java:1347)
 
~[apache-cassandra-3.7.jar:3.7]
    at 
org.apache.cassandra.schema.SchemaKeyspace.mergeSchema(SchemaKeyspace.java:1303)
 
~[apache-cassandra-3.7.jar:3.7]
    at 
org.apache.cassandra.schema.SchemaKeyspace.mergeSchemaAndAnnounceVersion(SchemaKeyspace.java:1253)
 
~[apache-cassandra-3.7.jar:3.7]
    at 
org.apache.cassandra.service.MigrationManager$1.runMayThrow(MigrationManager.java:532)
 
~[apache-cassandra-3.7.jar:3.7]
    at 
org.apache.cassandra.utils.WrappedRunnable.run(WrappedRunnable.java:28) 
~[apache-cassandra-3.7.jar:3.7]
    at 
java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) 
~[na:1.8.0_45]
    at java.util.concurrent.FutureTask.run(FutureTask.java:266) 
~[na:1.8.0_45]
    at 
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) 
~[na:1.8.0_45]
    at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) 
[na:1.8.0_45]
    at java.lang.Thread.run(Thread.java:745) [na:1.8.0_45]
ERROR 07:24:57 Unexpected error during query
java.lang.RuntimeException: java.util.concurrent.ExecutionException: 
org.apache.cassandra.exceptions.ConfigurationException: Column family ID 
mismatch (found b2b47bf0-5f94-11e6-867a-cb7beeeeb92c; expected 
b2b1bcd0-5f94-11e6-867a-cb7beeeeb92c)
    at 
org.apache.cassandra.utils.FBUtilities.waitOnFuture(FBUtilities.java:384) 
~[apache-cassandra-3.7.jar:3.7]
    at 
org.apache.cassandra.service.MigrationManager.announce(MigrationManager.java:514)
 
~[apache-cassandra-3.7.jar:3.7]
    at 
org.apache.cassandra.service.MigrationManager.announceNewColumnFamily(MigrationManager.java:343)
 
~[apache-cassandra-3.7.jar:3.7]
    at 
org.apache.cassandra.service.MigrationManager.announceNewColumnFamily(MigrationManager.java:313)
 
~[apache-cassandra-3.7.jar:3.7]
    at 
org.apache.cassandra.cql3.statements.CreateTableStatement.announceMigration(CreateTableStatement.java:89)
 
~[apache-cassandra-3.7.jar:3.7]
    at 
org.apache.cassandra.cql3.statements.SchemaAlteringStatement.execute(SchemaAlteringStatement.java:93)
 
~[apache-cassandra-3.7.jar:3.7]
    at 
org.apache.cassandra.cql3.QueryProcessor.processStatement(QueryProcessor.java:208)
 
~[apache-cassandra-3.7.jar:3.7]
    at 
org.apache.cassandra.cql3.QueryProcessor.process(QueryProcessor.java:239) 
~[apache-cassandra-3.7.jar:3.7]
    at 
org.apache.cassandra.cql3.QueryProcessor.process(QueryProcessor.java:224) 
~[apache-cassandra-3.7.jar:3.7]
    at 
org.apache.cassandra.transport.messages.QueryMessage.execute(QueryMessage.java:115)
 
~[apache-cassandra-3.7.jar:3.7]
    at 
org.apache.cassandra.transport.Message$Dispatcher.channelRead0(Message.java:507)
 
[apache-cassandra-3.7.jar:3.7]
    at 
org.apache.cassandra.transport.Message$Dispatcher.channelRead0(Message.java:401)
 
[apache-cassandra-3.7.jar:3.7]
    at 
io.netty.channel.SimpleChannelInboundHandler.channelRead(SimpleChannelInboundHandler.java:105)
 
[netty-all-4.0.36.Final.jar:4.0.36.Final]
    at 
io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:292)
 
[netty-all-4.0.36.Final.jar:4.0.36.Final]
    at 
io.netty.channel.AbstractChannelHandlerContext.access$600(AbstractChannelHandlerContext.java:32)
 
[netty-all-4.0.36.Final.jar:4.0.36.Final]
    at 
io.netty.channel.AbstractChannelHandlerContext$7.run(AbstractChannelHandlerContext.java:283)
 
[netty-all-4.0.36.Final.jar:4.0.36.Final]
    at 
java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) 
[na:1.8.0_45]
    at 
org.apache.cassandra.concurrent.AbstractLocalAwareExecutorService$FutureTask.run(AbstractLocalAwareExecutorService.java:164)
 
[apache-cassandra-3.7.jar:3.7]
    at org.apache.cassandra.concurrent.SEPWorker.run(SEPWorker.java:105) 
[apache-cassandra-3.7.jar:3.7]
    at java.lang.Thread.run(Thread.java:745) [na:1.8.0_45]

Is anyone faced similar exceptions ? How to resolve it ?

Regards,
Kamal C

Reply via email to