Cassandra节点没有启动;提交日志文件问题?

时间:2017-06-20 00:15:47

标签: cassandra

我在启动Cassandra节点时遇到问题。这是错误:

org.apache.cassandra.db.commitlog.CommitLogReadHandler$CommitLogReadException: Could not read commit log descriptor in file C:\apache-cassandra-3_extracted\apache-cassandra-3.10\data\commitlog\CommitLog-6-1497856002934.log
            at org.apache.cassandra.db.commitlog.CommitLogReader.readCommitLogSegment(CommitLogReader.java:153) [apache-cassandra-3.10.jar:3.10]
            at org.apache.cassandra.db.commitlog.CommitLogReader.readAllFiles(CommitLogReader.java:84) [apache-cassandra-3.10.jar:3.10]
            at org.apache.cassandra.db.commitlog.CommitLogReplayer.replayFiles(CommitLogReplayer.java:140) [apache-cassandra-3.10.jar:3.10]
            at org.apache.cassandra.db.commitlog.CommitLog.recoverFiles(CommitLog.java:177) [apache-cassandra-3.10.jar:3.10]
            at org.apache.cassandra.db.commitlog.CommitLog.recoverSegmentsOnDisk(CommitLog.java:158) [apache-cassandra-3.10.jar:3.10]
            at org.apache.cassandra.service.CassandraDaemon.setup(CassandraDaemon.java:326) [apache-cassandra-3.10.jar:3.10]
            at org.apache.cassandra.service.CassandraDaemon.activate(CassandraDaemon.java:601) [apache-cassandra-3.10.jar:3.10]
            at org.apache.cassandra.service.CassandraDaemon.main(CassandraDaemon.java:735) [apache-cassandra-3.10.jar:3.10]

有谁知道如何开始它?

1 个答案:

答案 0 :(得分:2)

这是在启动时读取commitlog的问题。您应该检查文件是否为空或具有错误的权限。

如果群集上有多个此节点 - 并且您的复制因子高于1,则只需删除此单个commitlog文件并尝试再次启动cassandra并运行修复。

这也适用于单节点或复制因子1 - 但此日志文件中的upserts数据丢失。