DataStax Academy FAQ

DataStax Academy migrated to a new learning management system (LMS) in July 2020. We are also moving to a new Cassandra Certification process so there are changes to exam bookings, voucher system and issuing of certificates.

Check out the Academy FAQ pages for answers to your questions:


question

MaxChoo avatar image
MaxChoo asked Erick Ramirez answered

Why did cassandra-stress not create keyspace1.standard1 in my DS201 VM?

I am doing ds201 exercise 16 - write path

The solution show this command

1623080443265.png

When i do and this message show up

1623080504401.png

Anyone can advise where i did wrong?

ds201
1623080443265.png (109.7 KiB)
1623080504401.png (142.1 KiB)
10 |1000 characters needed characters left characters exceeded

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

1 Answer

Erick Ramirez avatar image
Erick Ramirez answered

It's hard to know based on the limited info you provided so my guess is that you did not successfully run cassandra-stress.

If it ran successfully, you should see an output similar to this:

Connected to cluster: Test Cluster, max pending requests per connection 128, max connections per host 8
Datacenter: Cassandra; Host: localhost/127.0.0.1; Rack: rack1
Created keyspaces. Sleeping 1s for propagation.
Sleeping 2s...
Running WRITE with 1 threads for 10 iteration
type       total ops,    op/s,    pk/s,   row/s,    mean,     med,     .95,     .99,    .999,     max,   time,   stderr, errors,  gc: #,  max ms,  sum ms,  sdv ms,      mb
total,            10,      10,      10,      10,   9.775,   6.791,  29.868,  29.868,   29.87,    29.9,    1.0,  0.00000,      0,      0,       0,       0,       0,       0


Results:
Op rate                   :       10 op/s  [WRITE: 10 op/s]
Partition rate            :       10 pk/s  [WRITE: 10 pk/s]
Row rate                  :       10 row/s [WRITE: 10 row/s]
Latency mean              :  9.775 ms [WRITE: 9.8 ms]
Latency median            :  6.791 ms [WRITE: 6.8 ms]
Latency 95th percentile   : 29.868 ms [WRITE: 29.9 ms]
Latency 99th percentile   : 29.868 ms [WRITE: 29.9 ms]
Latency 99.9th percentile : 29.868 ms [WRITE: 29.9 ms]
Latency max               : 29.868 ms [WRITE: 29.9 ms]
Total partitions          :         10 [WRITE: 10]
Total errors              :          0 [WRITE: 0]
Total GC count            : 0
Total GC memory           : 0.000 KiB
Total GC time             :    0.0 seconds
Avg GC time               :    NaN ms
StdDev GC time            :    0.0 ms
Total operation time      : 00:00:00

END

I suspect your cluster isn't running so the tool couldn't connect to it. Verify that Cassandra is running in your VM using lsof. Here's an example output that shows the Cassandra process with process ID 1628 is listening for connections on port 9042:

$ sudo lsof -nPi -sTCP:LISTEN
COMMAND  PID   USER   FD   TYPE DEVICE SIZE/OFF NODE NAME
java    1628 ubuntu  489u  IPv4  17554      0t0  TCP 127.0.0.1:8609 (LISTEN)
java    1628 ubuntu  491u  IPv4  17558      0t0  TCP 127.0.0.1:38814 (LISTEN)
java    1628 ubuntu  492u  IPv4  17559      0t0  TCP *:7199 (LISTEN)
java    1628 ubuntu  496u  IPv4  18772      0t0  TCP 127.0.0.1:9042 (LISTEN)
java    1628 ubuntu  500u  IPv4  18061      0t0  TCP 127.0.0.1:7000 (LISTEN)
sshd    2196   root    3u  IPv4  23066      0t0  TCP *:22 (LISTEN)
sshd    2196   root    4u  IPv6  23068      0t0  TCP *:22 (LISTEN)

My suggestion is to check your Cassandra configuration and try again. Cheers!

Share
10 |1000 characters needed characters left characters exceeded

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.