cassandra有一日一个节点挂掉了,查询日志发现报错如下
of commit log /CASSANDRA_CL/cassandra/commitlog/CommitLog-600-1589017335228.log, with bad position but valid CRC
ERROR [main] 2020-05-20 01:34:57,651 CommitLogReplayer.java:435 - Replay stopped. If you wish to override this error and continue starting the node ignoring commit log replay problems, specify -Dcassandra.commitlog.ignorereplayerrors=true on the command line
ERROR [main] 2020-05-20 01:34:57,659 JVMStabilityInspector.java:251 - JVM state determined to be unstable. Exiting forcefully due to:
org.apache.cassandra.db.commitlog.CommitLogReplayer$CommitLogReplayException: Encountered bad header at position 389300 of commit log /CASSANDRA_CL/cassandra/commitlog/CommitLog-600-1589017335228.log, with bad position but valid CRC
原因:提交已损坏或未正确清空到磁盘的日志
解决办法如下,生产环境下不要随便执行此删除操作
删除 /CASSANDRA_CL/cassandra/commitlog中的commitlog,重启app-dse(systemctl restart app-dse)服务或对应的节点