Cassandra error: Exiting due to error while processing commit log during initialization


How to fix Cassandra error: Exiting due to error while processing commit log during initialization ?

You open the log file and see:

ERROR 06:55:52 Exiting due to error while processing commit log during initialization.
org.apache.cassandra.db.commitlog.CommitLogReadHandler$CommitLogReadException: Could not read commit log descriptor in file C:\Program Files\DataStax-DDC\data\commitlog\CommitLog-6-1520532648810.log
	at org.apache.cassandra.db.commitlog.CommitLogReader.readCommitLogSegment(CommitLogReader.java:155) [apache-cassandra-3.9.0.jar:3.9.0]
	at org.apache.cassandra.db.commitlog.CommitLogReader.readAllFiles(CommitLogReader.java:85) [apache-cassandra-3.9.0.jar:3.9.0]
	at org.apache.cassandra.db.commitlog.CommitLogReplayer.replayFiles(CommitLogReplayer.java:135) [apache-cassandra-3.9.0.jar:3.9.0]
	at org.apache.cassandra.db.commitlog.CommitLog.recoverFiles(CommitLog.java:187) [apache-cassandra-3.9.0.jar:3.9.0]
	at org.apache.cassandra.db.commitlog.CommitLog.recoverSegmentsOnDisk(CommitLog.java:167) [apache-cassandra-3.9.0.jar:3.9.0]
	at org.apache.cassandra.service.CassandraDaemon.setup(CassandraDaemon.java:323) [apache-cassandra-3.9.0.jar:3.9.0]
	at org.apache.cassandra.service.CassandraDaemon.activate(CassandraDaemon.java:601) [apache-cassandra-3.9.0.jar:3.9.0]
	at org.apache.cassandra.service.CassandraDaemon.main(CassandraDaemon.java:730) [apache-cassandra-3.9.0.jar:3.9.0]

How to fix this error? Simple, you delete all commitlog files, eg: C:\Program Files\DataStax-DDC\data\commitlog\

Leave a Reply