无法在macos上初始化cassandra

kokeuurv  于 2021-06-15  发布在  Cassandra
关注(0)|答案(1)|浏览(279)

我已经在macos 10.14上安装了cassandra 3.11.3。openjdk版本“11”2018-09-25 openjdk运行时环境18.9(内部版本11+28)openjdk 64位服务器vm 18.9(内部版本11+28,混合模式)
当我试图启动Cassandra,我得到

INFO  [main] 2018-10-26 15:11:28,607 ColumnFamilyStore.java:411 - Initializing system_schema.aggregates
INFO  [main] 2018-10-26 15:11:28,613 ColumnFamilyStore.java:411 - Initializing system_schema.indexes
INFO  [main] 2018-10-26 15:11:28,615 ViewManager.java:137 - Not submitting build tasks for views in keyspace system_schema as storage service is not initialized
Exception (java.lang.ExceptionInInitializerError) encountered during startup: null
java.lang.ExceptionInInitializerError
    at org.apache.cassandra.utils.ObjectSizes.sizeOfReferenceArray(ObjectSizes.java:79)
    at org.apache.cassandra.utils.ObjectSizes.sizeOfArray(ObjectSizes.java:89)
    at org.apache.cassandra.utils.ObjectSizes.sizeOnHeapExcludingData(ObjectSizes.java:112)
    at org.apache.cassandra.db.AbstractBufferClusteringPrefix.unsharedHeapSizeExcludingData(AbstractBufferClusteringPrefix.java:70)
    at org.apache.cassandra.db.rows.BTreeRow.unsharedHeapSizeExcludingData(BTreeRow.java:440)
    at org.apache.cassandra.db.partitions.AtomicBTreePartition$RowUpdater.apply(AtomicBTreePartition.java:336)
    at org.apache.cassandra.db.partitions.AtomicBTreePartition$RowUpdater.apply(AtomicBTreePartition.java:295)
    at org.apache.cassandra.utils.btree.BTree.buildInternal(BTree.java:139)
    at org.apache.cassandra.utils.btree.BTree.build(BTree.java:121)
    at org.apache.cassandra.utils.btree.BTree.update(BTree.java:178)
    at org.apache.cassandra.db.partitions.AtomicBTreePartition.addAllWithSizeDelta(AtomicBTreePartition.java:156)
    at org.apache.cassandra.db.Memtable.put(Memtable.java:282)
    at org.apache.cassandra.db.ColumnFamilyStore.apply(ColumnFamilyStore.java:1335)
    at org.apache.cassandra.db.Keyspace.applyInternal(Keyspace.java:626)
    at org.apache.cassandra.db.Keyspace.apply(Keyspace.java:470)
    at org.apache.cassandra.db.Mutation.apply(Mutation.java:227)
    at org.apache.cassandra.db.Mutation.apply(Mutation.java:232)
    at org.apache.cassandra.db.Mutation.apply(Mutation.java:241)
    at org.apache.cassandra.cql3.statements.ModificationStatement.executeInternalWithoutCondition(ModificationStatement.java:587)
    at org.apache.cassandra.cql3.statements.ModificationStatement.executeInternal(ModificationStatement.java:581)
    at org.apache.cassandra.cql3.QueryProcessor.executeOnceInternal(QueryProcessor.java:363)
    at org.apache.cassandra.db.SystemKeyspace.persistLocalMetadata(SystemKeyspace.java:520)
    at org.apache.cassandra.service.CassandraDaemon.setup(CassandraDaemon.java:221)
    at org.apache.cassandra.service.CassandraDaemon.activate(CassandraDaemon.java:602)
    at org.apache.cassandra.service.CassandraDaemon.main(CassandraDaemon.java:691)
Caused by: java.lang.StringIndexOutOfBoundsException: begin 0, end -1, length 5
    at java.base/java.lang.String.checkBoundsBeginEnd(String.java:3319)
    at java.base/java.lang.String.substring(String.java:1874)
    at org.github.jamm.MemoryLayoutSpecification.getEffectiveMemoryLayoutSpecification(MemoryLayoutSpecification.java:190)
    at org.github.jamm.MemoryLayoutSpecification.<clinit>(MemoryLayoutSpecification.java:31)
    ... 25 more
ERROR [main] 2018-10-26 15:11:28,682 CassandraDaemon.java:708 - Exception encountered during startup
java.lang.ExceptionInInitializerError: null
    at org.apache.cassandra.utils.ObjectSizes.sizeOfReferenceArray(ObjectSizes.java:79) ~[apache-cassandra-3.11.3.jar:3.11.3]
    at org.apache.cassandra.utils.ObjectSizes.sizeOfArray(ObjectSizes.java:89) ~[apache-cassandra-3.11.3.jar:3.11.3]
    at org.apache.cassandra.utils.ObjectSizes.sizeOnHeapExcludingData(ObjectSizes.java:112) ~[apache-cassandra-3.11.3.jar:3.11.3]
    at org.apache.cassandra.db.AbstractBufferClusteringPrefix.unsharedHeapSizeExcludingData(AbstractBufferClusteringPrefix.java:70) ~[apache-cassandra-3.11.3.jar:3.11.3]
    at org.apache.cassandra.db.rows.BTreeRow.unsharedHeapSizeExcludingData(BTreeRow.java:440) ~[apache-cassandra-3.11.3.jar:3.11.3]
    at org.apache.cassandra.db.partitions.AtomicBTreePartition$RowUpdater.apply(AtomicBTreePartition.java:336) ~[apache-cassandra-3.11.3.jar:3.11.3]
    at org.apache.cassandra.db.partitions.AtomicBTreePartition$RowUpdater.apply(AtomicBTreePartition.java:295) ~[apache-cassandra-3.11.3.jar:3.11.3]
    at org.apache.cassandra.utils.btree.BTree.buildInternal(BTree.java:139) ~[apache-cassandra-3.11.3.jar:3.11.3]
    at org.apache.cassandra.utils.btree.BTree.build(BTree.java:121) ~[apache-cassandra-3.11.3.jar:3.11.3]
    at org.apache.cassandra.utils.btree.BTree.update(BTree.java:178) ~[apache-cassandra-3.11.3.jar:3.11.3]
    at org.apache.cassandra.db.partitions.AtomicBTreePartition.addAllWithSizeDelta(AtomicBTreePartition.java:156) ~[apache-cassandra-3.11.3.jar:3.11.3]
    at org.apache.cassandra.db.Memtable.put(Memtable.java:282) ~[apache-cassandra-3.11.3.jar:3.11.3]
    at org.apache.cassandra.db.ColumnFamilyStore.apply(ColumnFamilyStore.java:1335) ~[apache-cassandra-3.11.3.jar:3.11.3]
    at org.apache.cassandra.db.Keyspace.applyInternal(Keyspace.java:626) ~[apache-cassandra-3.11.3.jar:3.11.3]
    at org.apache.cassandra.db.Keyspace.apply(Keyspace.java:470) ~[apache-cassandra-3.11.3.jar:3.11.3]
    at org.apache.cassandra.db.Mutation.apply(Mutation.java:227) ~[apache-cassandra-3.11.3.jar:3.11.3]
    at org.apache.cassandra.db.Mutation.apply(Mutation.java:232) ~[apache-cassandra-3.11.3.jar:3.11.3]
    at org.apache.cassandra.db.Mutation.apply(Mutation.java:241) ~[apache-cassandra-3.11.3.jar:3.11.3]
    at org.apache.cassandra.cql3.statements.ModificationStatement.executeInternalWithoutCondition(ModificationStatement.java:587) ~[apache-cassandra-3.11.3.jar:3.11.3]
    at org.apache.cassandra.cql3.statements.ModificationStatement.executeInternal(ModificationStatement.java:581) ~[apache-cassandra-3.11.3.jar:3.11.3]
    at org.apache.cassandra.cql3.QueryProcessor.executeOnceInternal(QueryProcessor.java:363) ~[apache-cassandra-3.11.3.jar:3.11.3]
    at org.apache.cassandra.db.SystemKeyspace.persistLocalMetadata(SystemKeyspace.java:520) ~[apache-cassandra-3.11.3.jar:3.11.3]
    at org.apache.cassandra.service.CassandraDaemon.setup(CassandraDaemon.java:221) ~[apache-cassandra-3.11.3.jar:3.11.3]
    at org.apache.cassandra.service.CassandraDaemon.activate(CassandraDaemon.java:602) ~[apache-cassandra-3.11.3.jar:3.11.3]
    at org.apache.cassandra.service.CassandraDaemon.main(CassandraDaemon.java:691) ~[apache-cassandra-3.11.3.jar:3.11.3]
Caused by: java.lang.StringIndexOutOfBoundsException: begin 0, end -1, length 5
    at java.base/java.lang.String.checkBoundsBeginEnd(String.java:3319) ~[na:na]
    at java.base/java.lang.String.substring(String.java:1874) ~[na:na]
    at org.github.jamm.MemoryLayoutSpecification.getEffectiveMemoryLayoutSpecification(MemoryLayoutSpecification.java:190) ~[jamm-0.3.0.jar:na]
    at org.github.jamm.MemoryLayoutSpecification.<clinit>(MemoryLayoutSpecification.java:31) ~[jamm-0.3.0.jar:na]
    ... 25 common frames omitted

我猜,某个地方没有初始化,或者存在与java相关的不兼容。有什么想法吗?

bsxbgnwa

bsxbgnwa1#

对java>8的支持只会出现在Cassandra4.0中,计划的发布日期还不清楚。所以您总是需要为casasndra3.11.x使用java8
您可以在下面的博客文章中阅读更多关于即将发布的版本和Java11的信息。

相关问题