2

I have installed cassandra 3.0.9 on server having centos 7. while trying to execute cassandra-stress with below command

cassandra-stress mixed n=2000000 -pop seq=1..2000000 -rate thread=2000 -node 10.10.0.1

it start executing according to command but after sometimes it start giving error like below

com.datastax.drivers.core.exceptions.NoHostAvailableExcception: All host(s) for query failed (tried: 10.10.0.1/10.10.0.1:9042 (com.datastax.driver.core.exceptions.TransportException: [10.10.0.1/10.10.0.1] Connection has been closed))

and sometimes gives error like below

java.io.IOException: Operation x0 on key(s) [35353538363236373030]: Data returned was not validated

    at org.apache.cassandra.stress.Operation.error(Operation.java:135)
    at org.apache.cassandra.stress.Operation.timeWithRetry(Operation.java:113)
    at org.apache.cassandra.stress.operations.predefined.CqlOperation.run(CqlOperation.java:98)
    at org.apache.cassandra.stress.operations.predefined.CqlOperation.run(CqlOperation.java:106)
    at org.apache.cassandra.stress.operations.predefined.CqlOperation.run(CqlOperation.java:258)
    at org.apache.cassandra.stress.StressAction$Consumer.run(StressAction.java:321)

java.io.IOException: Operation x0 on key(s) [4c364c39375032333431]: Data returned was not validated

    at org.apache.cassandra.stress.Operation.error(Operation.java:135)
    at org.apache.cassandra.stress.Operation.timeWithRetry(Operation.java:113)
    at org.apache.cassandra.stress.operations.predefined.CqlOperation.run(CqlOperation.java:98)
    at org.apache.cassandra.stress.operations.predefined.CqlOperation.run(CqlOperation.java:106)
    at org.apache.cassandra.stress.operations.predefined.CqlOperation.run(CqlOperation.java:258)
    at org.apache.cassandra.stress.StressAction$Consumer.run(StressAction.java:321)

java.io.IOException: Operation x0 on key(s) [4b364e504c4b4c314e30]: Data returned was not validated

    at org.apache.cassandra.stress.Operation.error(Operation.java:135)
    at org.apache.cassandra.stress.Operation.timeWithRetry(Operation.java:113)
    at org.apache.cassandra.stress.operations.predefined.CqlOperation.run(CqlOperation.java:98)
    at org.apache.cassandra.stress.operations.predefined.CqlOperation.run(CqlOperation.java:106)
    at org.apache.cassandra.stress.operations.predefined.CqlOperation.run(CqlOperation.java:258)
    at org.apache.cassandra.stress.StressAction$Consumer.run(StressAction.java:321)

java.io.IOException: Operation x0 on key(s) [3435504d3135374b3031]: Data returned was not validated

    at org.apache.cassandra.stress.Operation.error(Operation.java:135)
    at org.apache.cassandra.stress.Operation.timeWithRetry(Operation.java:113)
    at org.apache.cassandra.stress.operations.predefined.CqlOperation.run(CqlOperation.java:98)
    at org.apache.cassandra.stress.operations.predefined.CqlOperation.run(CqlOperation.java:106)
    at org.apache.cassandra.stress.operations.predefined.CqlOperation.run(CqlOperation.java:258)
    at org.apache.cassandra.stress.StressAction$Consumer.run(StressAction.java:321)

java.io.IOException: Operation x0 on key(s) [303936354c5033343130]: Data returned was not validated

Thanks

Dushyant Gohil
  • 67
  • 1
  • 12

1 Answers1

3

You need to write the data before reading it.

First execute: cassandra-stress write n=2000000 -pop seq=1..2000000 -rate threads=2000 -node 10.10.0.1

Then you can execute: cassandra-stress mixed n=2000000 -pop seq=1..2000000 -rate threads=2000 -node 10.10.0.1

csplinter
  • 51
  • 3
  • that also has been done but the issue is same while executing command with mixed – Dushyant Gohil Oct 05 '16 at 05:17
  • write has been done read has been done than started mixed even with decreasing threads till 100 even though getting that error – Dushyant Gohil Oct 05 '16 at 05:18
  • Please see [this post](http://stackoverflow.com/questions/18724334/cant-connect-to-cassandra-nohostavailableexception) for the NoHostAvailableException. To clarify, you are only seeing the `java.io.IOException: Operation x0 on key(s)` exception when running mixed command and not while running write / read commands? – csplinter Oct 05 '16 at 20:04
  • rpc_address is set to 0.0.0.0 also cassandra.yaml configruations is set properly currently Cassandra is installed on one server only and we are doing testing of it using cassandra-stress also all the pre-requisite is installed and configured properly yet getting this error. one more thing when I have done write and read with cassandra stress it was working fine, why its not working with mixed only. the difference is , when I have done read and write count set to 1000000 and now in mixed I have used 2000000. – Dushyant Gohil Oct 06 '16 at 09:16
  • You can not use a higher count for mixed than for write. The reason is because the rows generated from seed values 1000000-2000000 were never written as your count was 1000000 for your write command. Therefore only rows generated from seeds 1-1000000 were written by your initial write command. – csplinter Oct 08 '16 at 01:08
  • it means if I have write operation with 1000000 count than I should use mixed with the same count not more than that and if I want to do so I have to increase write count first right? – Dushyant Gohil Oct 12 '16 at 11:42