nodetool 修复失败并出现快照错误

nodetool 修复失败并出现快照错误

运行 nodetool repair 时,修复在 system_auth 键空间上失败,并出现以下日志条目:

INFO  [AntiEntropySessions:5] 2015-03-17 20:00:34,795 RepairSession.java:260 - [repair #460cebb0-cce0-11e4-ba34-299132139fb9] new session: will sync <list of hosts and ips> on range (-7227533065400353128,-7224188466775720910] for system_auth.[credentials, users]
ERROR [AntiEntropySessions:1] 2015-03-17 20:00:34,800 RepairSession.java:303 - [repair #3f7e2610-cce0-11e4-ba34-299132139fb9] session completed with the following error
java.io.IOException: Failed during snapshot creation.
    at org.apache.cassandra.repair.RepairSession.failedSnapshot(RepairSession.java:344) ~[apache-cassandra-2.1.3.jar:2.1.3]
    at org.apache.cassandra.repair.RepairJob$2.onFailure(RepairJob.java:146) ~[apache-cassandra-2.1.3.jar:2.1.3]
    at com.google.common.util.concurrent.Futures$4.run(Futures.java:1172) ~[guava-16.0.jar:na]
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [na:1.7.0_75]
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [na:1.7.0_75]
    at java.lang.Thread.run(Thread.java:745) [na:1.7.0_75]

错误每隔几秒就会重复一次,直到我重新启动 Cassandra 服务。另一方面,如果我重新启动 Cassandra 服务nodetool snapshot system_auth,操作就会成功(没有日志条目)。

我的cassandra版本是2.1.3。

答案1

我们在 Cassandra 2.1.5 中也遇到了类似的问题。

您可以尝试运行:

nodetool scrub system_auth

根据https://issues.apache.org/jira/browse/CASSANDRA-8696增加 cassandra.yaml 中的值request_timeout_in_ms也可能会有帮助(他们计划改变nodetool repairCassandra 2.1.6 及更新版本中使用的超时值)。

相关内容