【问题标题】:Cassandra: error in Initializing system.sstable activityCassandra:初始化 system.sstable 活动时出错
【发布时间】:2015-12-25 08:48:06
【问题描述】:

我在 cassandra 启动时遇到了一些问题。异常的详细信息如下:-

INFO  06:49:10 Initializing system.sstable_activity
ERROR 06:49:10 Exiting due to error while processing commit log during initialization.
java.lang.InternalError: a fault occurred in a recent unsafe memory access operation in compiled Java code
    at org.apache.cassandra.db.commitlog.CommitLogDescriptor.writeHeader(CommitLogDescriptor.java:73) ~[apache-cassandra-2.1.9.jar:2.1.9]
    at org.apache.cassandra.db.commitlog.CommitLogSegment.<init>(CommitLogSegment.java:168) ~[apache-cassandra-2.1.9.jar:2.1.9]
    at org.apache.cassandra.db.commitlog.CommitLogSegment.freshSegment(CommitLogSegment.java:119) ~[apache-cassandra-2.1.9.jar:2.1.9]
    at org.apache.cassandra.db.commitlog.CommitLogSegmentManager$1.runMayThrow(CommitLogSegmentManager.java:119) ~[apache-cassandra-2.1.9.jar:2.1.9]
    at org.apache.cassandra.utils.WrappedRunnable.run(WrappedRunnable.java:28) [apache-cassandra-2.1.9.jar:2.1.9]
    at java.lang.Thread.run(Unknown Source) [na:1.8.0_60]

这可能是什么原因?

【问题讨论】:

  • 我刚刚发现,这是因为我的系统内存不足。由于某些其他进程的日志,此内存已被用完。也可能是因为 cassandra 自己维护了一些冗余缓存。如这个问题所示-> [stackoverflow.com/questions/25664128/…

标签: cassandra cqlsh nosql


【解决方案1】:

不知道这是什么原因,但是重启我的系统解决了这个问题。

【讨论】:

    【解决方案2】:

    我通过删除导致问题的提交日志解决了这个问题。

    我在 /casandra/data/commitlog 中找到了日志。

    删除后,我重新运行了 cassandra,一切正常。我希望这对某人有帮助!

    【讨论】:

    • 谢谢,这个解决方案运行良好.. 但真正的问题是磁盘空间已满!
    【解决方案3】:

    这就是我解决提交日志问题的方法。仅当您不关心保留提交日志的状态时才应该这样做。

    尝试使用 cassandra 重启

    sudo systemctl restart cassandra
    

    然后我检查

    systemctl status cassandra
    

    并看到状态为“已退出”,因此存在问题。使用检查 cassandra 的日志

    sudo less /var/log/cassandra/system.log
    
    and see org.apache.cassandra.db.commitlog.CommitLogReplayer$CommitLogReplayException: Could not read commit log descriptor in file /var/lib/cassandra/commitlog/CommitLog-6-1498210233635.log
    

    因为我不在乎保留 Cassandra 的状态,所以我删除了所有提交日志,现在它可以正常启动了

    sudo rm /var/lib/cassandra/commitlog/CommitLog*
    sudo systemctl restart cassandra
    

    systemctl status cassandra(应该确认它现在正在运行)

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2016-09-25
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多