Cassandra关机,原因是:java.io.SyncFailedException:同步失败

时间:2018-10-29 11:03:29

标签: java cassandra

我正在使用Cassnadra 2.1.13单节点集群,并且数据库运行良好,没有任何问题。

然后发生以下异常,这是因为Cassandra服务被关闭了。

在单节点群集中,这些异常特别是同步失败的原因可能是什么,导致此问题根源的任何提示或指针是什么?

  

INFO [MemtableFlushWriter:22] Memtable.java:347-编写   Memtable-compaction_history @ 1884003282(0.521KiB序列化字节,19   运维,开/关堆限制的0%/ 0%)INFO [MemtableFlushWriter:22]   Memtable.java:382-完成冲洗   /myspace/db/data/system/compaction_history-b4dbb7b4dc493fb5b3bfce6e434832ca/system-compaction_history-tmp-ka-8-Data.db   (0.000KiB)用于提交日志的位置   ReplayPosition(segmentId = 1540762960100,po​​sition = 2642365)错误   [MemtableFlushWriter:21] CassandraDaemon.java:229-异常   线程线程[MemtableFlushWriter:21,5,main]   org.apache.cassandra.io.FSWriteError:java.io.SyncFailedException:   同步失败           在org.apache.cassandra.io.util.SequentialWriter.syncDataOnlyInternal(SequentialWriter.java:254)   〜[apache-cassandra-2.1.13.jar:2.1.13]           在org.apache.cassandra.io.util.SequentialWriter.syncInternal(SequentialWriter.java:263)   〜[apache-cassandra-2.1.13.jar:2.1.13]           在org.apache.cassandra.io.util.SequentialWriter.close(SequentialWriter.java:451)   〜[apache-cassandra-2.1.13.jar:2.1.13]           在org.apache.cassandra.io.compress.CompressedSequentialWriter.close(CompressedSequentialWriter.java:264)   〜[apache-cassandra-2.1.13.jar:2.1.13]           在org.apache.cassandra.io.sstable.SSTableWriter.close(SSTableWriter.java:503)   〜[apache-cassandra-2.1.13.jar:2.1.13]           在org.apache.cassandra.io.sstable.SSTableWriter.finish(SSTableWriter.java:455)   〜[apache-cassandra-2.1.13.jar:2.1.13]           在org.apache.cassandra.io.sstable.SSTableWriter.closeAndOpenReader(SSTableWriter.java:447)   〜[apache-cassandra-2.1.13.jar:2.1.13]           在org.apache.cassandra.io.sstable.SSTableWriter.closeAndOpenReader(SSTableWriter.java:442)   〜[apache-cassandra-2.1.13.jar:2.1.13]           在org.apache.cassandra.db.Memtable $ FlushRunnable.writeSortedContents(Memtable.java:389)   〜[apache-cassandra-2.1.13.jar:2.1.13]           在org.apache.cassandra.db.Memtable $ FlushRunnable.runMayThrow(Memtable.java:335)   〜[apache-cassandra-2.1.13.jar:2.1.13]           在org.apache.cassandra.utils.WrappedRunnable.run(WrappedRunnable.java:28)   〜[apache-cassandra-2.1.13.jar:2.1.13]           在com.google.common.util.concurrent.MoreExecutors $ SameThreadExecutorService.execute(MoreExecutors.java:297)   〜[guava-16.0.jar:na]           在org.apache.cassandra.db.ColumnFamilyStore $ Flush.run(ColumnFamilyStore.java:1120)   〜[apache-cassandra-2.1.13.jar:2.1.13]           在java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)   〜[na:1.8.0_192]           在java.util.concurrent.ThreadPoolExecutor $ Worker.run(ThreadPoolExecutor.java:624)   〜[na:1.8.0_192]           在java.lang.Thread.run(Thread.java:748)〜[na:1.8.0_192]原因:java.io.SyncFailedException:同步失败           在java.io.FileDescriptor.sync(本机方法)〜[na:1.8.0_192]           在org.apache.cassandra.io.util.SequentialWriter.syncDataOnlyInternal(SequentialWriter.java:250)   〜[apache-cassandra-2.1.13.jar:2.1.13]           ...省略了15个常见框架

     

错误[MemtableFlushWriter:21] StorageService.java:453-停止   闲话警告[MemtableFlushWriter:21] StorageService.java:359-   通过操作员请求INFO停止流言[语[MemtableFlushWriter:21]   Gossiper.java:1455-宣布关闭

重新启动Cassandra服务后,没有问题,并且可以按预期工作。

1 个答案:

答案 0 :(得分:1)

我怀疑这是:

  • 磁盘问题-检查磁盘的/var/log/messages和SMART状态
  • 磁盘已满
  • 文件已被删除(尽管这不太可能,但是如果系统上装有防病毒软件,则可能会发生这种情况)