com.datastax.driver.core.exceptions.WriteTimeoutException: Cassandra timeout during write query at consistency ONE (1 replica were required but only 1 acknowledged the write)

DataStax JIRA | Carl Lerche | 3 years ago
  1. 0

    The exception implies that the write timed out waiting for replicas to respond, except that all the replicas responded. I'm assuming that the timeout happened after the replica responded but before the write "succeeded" but I don't really know. This happened in a testing environment. There was a single cassandra server in the cluster. Here is the backtrace: com.datastax.driver.core.exceptions.WriteTimeoutException: Cassandra timeout during write query at consistency ONE (1 replica were required but only 1 acknowledged the write) at com.datastax.driver.core.exceptions.WriteTimeoutException.copy(WriteTimeoutException.java:54) ~[stormjar.jar:na] at com.datastax.driver.core.Responses$Error.asException(Responses.java:92) ~[stormjar.jar:na] at com.datastax.driver.core.ResultSetFuture$ResponseCallback.onSet(ResultSetFuture.java:122) ~[stormjar.jar:na] at com.datastax.driver.core.RequestHandler.setFinalResult(RequestHandler.java:224) ~[stormjar.jar:na] at com.datastax.driver.core.RequestHandler.onSet(RequestHandler.java:371) ~[stormjar.jar:na] at com.datastax.driver.core.Connection$Dispatcher.messageReceived(Connection.java:510) ~[stormjar.jar:na] at org.jboss.netty.channel.SimpleChannelUpstreamHandler.handleUpstream(SimpleChannelUpstreamHandler.java:70) ~[netty-3.6.3.Final.jar:na] at org.jboss.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:560) ~[netty-3.6.3.Final.jar:na] at org.jboss.netty.channel.DefaultChannelPipeline$DefaultChannelHandlerContext.sendUpstream(DefaultChannelPipeline.java:787) ~[netty-3.6.3.Final.jar:na] at org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:296) ~[netty-3.6.3.Final.jar:na] at org.jboss.netty.handler.codec.oneone.OneToOneDecoder.handleUpstream(OneToOneDecoder.java:70) ~[netty-3.6.3.Final.jar:na] at org.jboss.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:560) ~[netty-3.6.3.Final.jar:na] at org.jboss.netty.channel.DefaultChannelPipeline$DefaultChannelHandlerContext.sendUpstream(DefaultChannelPipeline.java:787) ~[netty-3.6.3.Final.jar:na] at org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:296) ~[netty-3.6.3.Final.jar:na] at org.jboss.netty.handler.codec.frame.FrameDecoder.unfoldAndFireMessageReceived(FrameDecoder.java:462) ~[netty-3.6.3.Final.jar:na] at org.jboss.netty.handler.codec.frame.FrameDecoder.callDecode(FrameDecoder.java:443) ~[netty-3.6.3.Final.jar:na] at org.jboss.netty.handler.codec.frame.FrameDecoder.messageReceived(FrameDecoder.java:303) ~[netty-3.6.3.Final.jar:na] at org.jboss.netty.channel.SimpleChannelUpstreamHandler.handleUpstream(SimpleChannelUpstreamHandler.java:70) ~[netty-3.6.3.Final.jar:na] at org.jboss.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:560) ~[netty-3.6.3.Final.jar:na] at org.jboss.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:555) ~[netty-3.6.3.Final.jar:na] at org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:268) ~[netty-3.6.3.Final.jar:na] at org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:255) ~[netty-3.6.3.Final.jar:na] at org.jboss.netty.channel.socket.nio.NioWorker.read(NioWorker.java:88) ~[netty-3.6.3.Final.jar:na] at org.jboss.netty.channel.socket.nio.AbstractNioWorker.process(AbstractNioWorker.java:107) ~[netty-3.6.3.Final.jar:na] at org.jboss.netty.channel.socket.nio.AbstractNioSelector.run(AbstractNioSelector.java:312) ~[netty-3.6.3.Final.jar:na] at org.jboss.netty.channel.socket.nio.AbstractNioWorker.run(AbstractNioWorker.java:88) ~[netty-3.6.3.Final.jar:na] at org.jboss.netty.channel.socket.nio.NioWorker.run(NioWorker.java:178) ~[netty-3.6.3.Final.jar:na] at org.jboss.netty.util.ThreadRenamingRunnable.run(ThreadRenamingRunnable.java:108) ~[netty-3.6.3.Final.jar:na] at org.jboss.netty.util.internal.DeadLockProofWorker$1.run(DeadLockProofWorker.java:42) ~[netty-3.6.3.Final.jar:na] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) ~[na:1.7.0_25] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) ~[na:1.7.0_25] at java.lang.Thread.run(Thread.java:724) ~[na:1.7.0_25]

    DataStax JIRA | 3 years ago | Carl Lerche
    com.datastax.driver.core.exceptions.WriteTimeoutException: Cassandra timeout during write query at consistency ONE (1 replica were required but only 1 acknowledged the write)
  2. 0

    The exception implies that the write timed out waiting for replicas to respond, except that all the replicas responded. I'm assuming that the timeout happened after the replica responded but before the write "succeeded" but I don't really know. This happened in a testing environment. There was a single cassandra server in the cluster. Here is the backtrace: com.datastax.driver.core.exceptions.WriteTimeoutException: Cassandra timeout during write query at consistency ONE (1 replica were required but only 1 acknowledged the write) at com.datastax.driver.core.exceptions.WriteTimeoutException.copy(WriteTimeoutException.java:54) ~[stormjar.jar:na] at com.datastax.driver.core.Responses$Error.asException(Responses.java:92) ~[stormjar.jar:na] at com.datastax.driver.core.ResultSetFuture$ResponseCallback.onSet(ResultSetFuture.java:122) ~[stormjar.jar:na] at com.datastax.driver.core.RequestHandler.setFinalResult(RequestHandler.java:224) ~[stormjar.jar:na] at com.datastax.driver.core.RequestHandler.onSet(RequestHandler.java:371) ~[stormjar.jar:na] at com.datastax.driver.core.Connection$Dispatcher.messageReceived(Connection.java:510) ~[stormjar.jar:na] at org.jboss.netty.channel.SimpleChannelUpstreamHandler.handleUpstream(SimpleChannelUpstreamHandler.java:70) ~[netty-3.6.3.Final.jar:na] at org.jboss.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:560) ~[netty-3.6.3.Final.jar:na] at org.jboss.netty.channel.DefaultChannelPipeline$DefaultChannelHandlerContext.sendUpstream(DefaultChannelPipeline.java:787) ~[netty-3.6.3.Final.jar:na] at org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:296) ~[netty-3.6.3.Final.jar:na] at org.jboss.netty.handler.codec.oneone.OneToOneDecoder.handleUpstream(OneToOneDecoder.java:70) ~[netty-3.6.3.Final.jar:na] at org.jboss.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:560) ~[netty-3.6.3.Final.jar:na] at org.jboss.netty.channel.DefaultChannelPipeline$DefaultChannelHandlerContext.sendUpstream(DefaultChannelPipeline.java:787) ~[netty-3.6.3.Final.jar:na] at org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:296) ~[netty-3.6.3.Final.jar:na] at org.jboss.netty.handler.codec.frame.FrameDecoder.unfoldAndFireMessageReceived(FrameDecoder.java:462) ~[netty-3.6.3.Final.jar:na] at org.jboss.netty.handler.codec.frame.FrameDecoder.callDecode(FrameDecoder.java:443) ~[netty-3.6.3.Final.jar:na] at org.jboss.netty.handler.codec.frame.FrameDecoder.messageReceived(FrameDecoder.java:303) ~[netty-3.6.3.Final.jar:na] at org.jboss.netty.channel.SimpleChannelUpstreamHandler.handleUpstream(SimpleChannelUpstreamHandler.java:70) ~[netty-3.6.3.Final.jar:na] at org.jboss.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:560) ~[netty-3.6.3.Final.jar:na] at org.jboss.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:555) ~[netty-3.6.3.Final.jar:na] at org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:268) ~[netty-3.6.3.Final.jar:na] at org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:255) ~[netty-3.6.3.Final.jar:na] at org.jboss.netty.channel.socket.nio.NioWorker.read(NioWorker.java:88) ~[netty-3.6.3.Final.jar:na] at org.jboss.netty.channel.socket.nio.AbstractNioWorker.process(AbstractNioWorker.java:107) ~[netty-3.6.3.Final.jar:na] at org.jboss.netty.channel.socket.nio.AbstractNioSelector.run(AbstractNioSelector.java:312) ~[netty-3.6.3.Final.jar:na] at org.jboss.netty.channel.socket.nio.AbstractNioWorker.run(AbstractNioWorker.java:88) ~[netty-3.6.3.Final.jar:na] at org.jboss.netty.channel.socket.nio.NioWorker.run(NioWorker.java:178) ~[netty-3.6.3.Final.jar:na] at org.jboss.netty.util.ThreadRenamingRunnable.run(ThreadRenamingRunnable.java:108) ~[netty-3.6.3.Final.jar:na] at org.jboss.netty.util.internal.DeadLockProofWorker$1.run(DeadLockProofWorker.java:42) ~[netty-3.6.3.Final.jar:na] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) ~[na:1.7.0_25] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) ~[na:1.7.0_25] at java.lang.Thread.run(Thread.java:724) ~[na:1.7.0_25]

    DataStax JIRA | 3 years ago | Carl Lerche
    com.datastax.driver.core.exceptions.WriteTimeoutException: Cassandra timeout during write query at consistency ONE (1 replica were required but only 1 acknowledged the write)
  3. 0

    Cassandra Frequent Read Write Timeouts

    Stack Overflow | 3 years ago | user2572801
    com.datastax.driver.core.exceptions.WriteTimeoutException: Cassandra timeout during write query at consistency ONE (1 replica were required but only 0 acknowledged the write)
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    Write timeout thrown by cassandra datastax driver

    Stack Overflow | 3 years ago | Jacob
    com.datastax.driver.core.exceptions.WriteTimeoutException: Cassandra timeout during write query at consistency ONE (1 replica were required but only 0 acknowledged the write)
  6. 0

    Where to I start to get to the bottom of this WriteTimeout issue?

    Google Groups | 3 years ago | Jacob Rhoden
    com.datastax.driver.core.exceptions.WriteTimeoutException: Cassandra timeout during write query at consistency ONE (1 replica were required but only 0 acknowledged the write)

    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. com.datastax.driver.core.exceptions.WriteTimeoutException

      Cassandra timeout during write query at consistency ONE (1 replica were required but only 1 acknowledged the write)

      at com.datastax.driver.core.exceptions.WriteTimeoutException.copy()
    2. DataStax Java Driver for Apache Cassandra - Core
      Connection$Dispatcher.messageReceived
      1. com.datastax.driver.core.exceptions.WriteTimeoutException.copy(WriteTimeoutException.java:54)[stormjar.jar:na]
      2. com.datastax.driver.core.Responses$Error.asException(Responses.java:92)[stormjar.jar:na]
      3. com.datastax.driver.core.ResultSetFuture$ResponseCallback.onSet(ResultSetFuture.java:122)[stormjar.jar:na]
      4. com.datastax.driver.core.RequestHandler.setFinalResult(RequestHandler.java:224)[stormjar.jar:na]
      5. com.datastax.driver.core.RequestHandler.onSet(RequestHandler.java:371)[stormjar.jar:na]
      6. com.datastax.driver.core.Connection$Dispatcher.messageReceived(Connection.java:510)[stormjar.jar:na]
      6 frames
    3. Netty
      DeadLockProofWorker$1.run
      1. org.jboss.netty.channel.SimpleChannelUpstreamHandler.handleUpstream(SimpleChannelUpstreamHandler.java:70)[netty-3.6.3.Final.jar:na]
      2. org.jboss.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:560)[netty-3.6.3.Final.jar:na]
      3. org.jboss.netty.channel.DefaultChannelPipeline$DefaultChannelHandlerContext.sendUpstream(DefaultChannelPipeline.java:787)[netty-3.6.3.Final.jar:na]
      4. org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:296)[netty-3.6.3.Final.jar:na]
      5. org.jboss.netty.handler.codec.oneone.OneToOneDecoder.handleUpstream(OneToOneDecoder.java:70)[netty-3.6.3.Final.jar:na]
      6. org.jboss.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:560)[netty-3.6.3.Final.jar:na]
      7. org.jboss.netty.channel.DefaultChannelPipeline$DefaultChannelHandlerContext.sendUpstream(DefaultChannelPipeline.java:787)[netty-3.6.3.Final.jar:na]
      8. org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:296)[netty-3.6.3.Final.jar:na]
      9. org.jboss.netty.handler.codec.frame.FrameDecoder.unfoldAndFireMessageReceived(FrameDecoder.java:462)[netty-3.6.3.Final.jar:na]
      10. org.jboss.netty.handler.codec.frame.FrameDecoder.callDecode(FrameDecoder.java:443)[netty-3.6.3.Final.jar:na]
      11. org.jboss.netty.handler.codec.frame.FrameDecoder.messageReceived(FrameDecoder.java:303)[netty-3.6.3.Final.jar:na]
      12. org.jboss.netty.channel.SimpleChannelUpstreamHandler.handleUpstream(SimpleChannelUpstreamHandler.java:70)[netty-3.6.3.Final.jar:na]
      13. org.jboss.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:560)[netty-3.6.3.Final.jar:na]
      14. org.jboss.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:555)[netty-3.6.3.Final.jar:na]
      15. org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:268)[netty-3.6.3.Final.jar:na]
      16. org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:255)[netty-3.6.3.Final.jar:na]
      17. org.jboss.netty.channel.socket.nio.NioWorker.read(NioWorker.java:88)[netty-3.6.3.Final.jar:na]
      18. org.jboss.netty.channel.socket.nio.AbstractNioWorker.process(AbstractNioWorker.java:107)[netty-3.6.3.Final.jar:na]
      19. org.jboss.netty.channel.socket.nio.AbstractNioSelector.run(AbstractNioSelector.java:312)[netty-3.6.3.Final.jar:na]
      20. org.jboss.netty.channel.socket.nio.AbstractNioWorker.run(AbstractNioWorker.java:88)[netty-3.6.3.Final.jar:na]
      21. org.jboss.netty.channel.socket.nio.NioWorker.run(NioWorker.java:178)[netty-3.6.3.Final.jar:na]
      22. org.jboss.netty.util.ThreadRenamingRunnable.run(ThreadRenamingRunnable.java:108)[netty-3.6.3.Final.jar:na]
      23. org.jboss.netty.util.internal.DeadLockProofWorker$1.run(DeadLockProofWorker.java:42)[netty-3.6.3.Final.jar:na]
      23 frames
    4. Java RT
      Thread.run
      1. java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)[na:1.7.0_25]
      2. java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)[na:1.7.0_25]
      3. java.lang.Thread.run(Thread.java:724)[na:1.7.0_25]
      3 frames