Monday, October 2, 2023

Cassandra: com.datastax.driver.core.exceptions.InvalidQueryException: Keyspace 'keyspace1' does not exist


cassandra-stress read test failed with key space doesn't exist. 

 

cassandra-stress read n=200000 -node 192.168.1.32


Warming up READ with 50000 iterations...
Connected to cluster: Test Cluster, max pending requests per connection 128, max connections per host 8
Datacenter: datacenter1; Host: /192.168.1.32:9042; Rack: rack1
Datacenter: datacenter1; Host: /192.168.1.35:9042; Rack: rack1
Failed to connect over JMX; not collecting these stats
Connected to cluster: Test Cluster, max pending requests per connection 128, max connections per host 8
Datacenter: datacenter1; Host: /192.168.1.32:9042; Rack: rack1
Datacenter: datacenter1; Host: /192.168.1.35:9042; Rack: rack1
com.datastax.driver.core.exceptions.InvalidQueryException: Keyspace 'keyspace1' does not exist
Connected to cluster: Test Cluster, max pending requests per connection 128, max connections per host 8
Datacenter: datacenter1; Host: /192.168.1.32:9042; Rack: rack1
Datacenter: datacenter1; Host: /192.168.1.35:9042; Rack: rack1
com.datastax.driver.core.exceptions.InvalidQueryException: Keyspace 'keyspace1' does not exist
Connected to cluster: Test Cluster, max pending requests per connection 128, max connections per host 8
......................................
...........................
......................

Failed to create client too many times
Failed to create client too many times
Failed to create client too many times
Failed to create client too many times
Failed to create client too many times
Failed to create client too many times
Failed to create client too many times
Failed to create client too many times
Failed to create client too many times

....................



It failed because a new environment needs to run Write, so it creates all the necessary keyspaces and tables before reading. Once that's done, the Read will work.


cassandra-stress write  n=200000 -node 192.168.1.32











No comments:

Post a Comment