Cassandra AssertionError:长度不是> 0

时间:2016-07-28 13:04:08

标签: cassandra

尝试启动3.0.5 cassandra集群时遇到以下异常。不确定这意味着什么或如何继续。

INFO  14:14:05 Initializing keyspace.table
Exception (java.lang.AssertionError) encountered during startup: length is not > 0: 0
java.lang.AssertionError: length is not > 0: 0
    at org.apache.cassandra.utils.ByteBufferUtil.readBytes(ByteBufferUtil.java:408)
    at org.apache.cassandra.io.sstable.metadata.CompactionMetadata$CompactionMetadataSerializer.deserialize(CompactionMetadata.java:93)
    at org.apache.cassandra.io.sstable.metadata.CompactionMetadata$CompactionMetadataSerializer.deserialize(CompactionMetadata.java:73)
    at org.apache.cassandra.io.sstable.metadata.MetadataSerializer.deserialize(MetadataSerializer.java:123)
    at org.apache.cassandra.io.sstable.metadata.MetadataSerializer.deserialize(MetadataSerializer.java:94)
    at org.apache.cassandra.io.sstable.metadata.MetadataSerializer.mutateLevel(MetadataSerializer.java:133)
    at org.apache.cassandra.db.compaction.LeveledManifest.add(LeveledManifest.java:132)
    at org.apache.cassandra.db.compaction.LeveledCompactionStrategy.addSSTable(LeveledCompactionStrategy.java:278)
    at org.apache.cassandra.db.compaction.CompactionStrategyManager.startup(CompactionStrategyManager.java:135)
    at org.apache.cassandra.db.compaction.CompactionStrategyManager.reload(CompactionStrategyManager.java:187)
    at org.apache.cassandra.db.compaction.CompactionStrategyManager.<init>(CompactionStrategyManager.java:75)
    at org.apache.cassandra.db.ColumnFamilyStore.<init>(ColumnFamilyStore.java:394)
    at org.apache.cassandra.db.ColumnFamilyStore.<init>(ColumnFamilyStore.java:353)
    at org.apache.cassandra.db.ColumnFamilyStore.createColumnFamilyStore(ColumnFamilyStore.java:560)
    at org.apache.cassandra.db.ColumnFamilyStore.createColumnFamilyStore(ColumnFamilyStore.java:537)
    at org.apache.cassandra.db.Keyspace.initCf(Keyspace.java:368)
    at org.apache.cassandra.db.Keyspace.<init>(Keyspace.java:305)
    at org.apache.cassandra.db.Keyspace.open(Keyspace.java:129)
    at org.apache.cassandra.db.Keyspace.open(Keyspace.java:106)
    at org.apache.cassandra.service.CassandraDaemon.setup(CassandraDaemon.java:250)
    at org.apache.cassandra.service.CassandraDaemon.activate(CassandraDaemon.java:551)
    at org.apache.cassandra.service.CassandraDaemon.main(CassandraDaemon.java:679)
ERROR 10:37:43 Exception encountered during startup

1 个答案:

答案 0 :(得分:1)

您的一个表看起来有一个损坏的元数据组件。尝试在受影响的表中的sstables上运行sstablescrubhttps://docs.datastax.com/en/cassandra/2.2/cassandra/tools/toolsSSTableScrub.html)并删除有问题的表。您应该只需要运行清单检查(--manifest-check选项),因为这实际上是在堆栈跟踪中失败的。一旦节点再次启动,请确保对其进行修复以恢复任何丢失的数据。