I have created 2 node cassandra cluster with below configurations.
Node-1:
cassandra-topology.properties:
192.168.1.177=DC1:RAC1
192.168.1.134=DC2:RAC2
cassandra.yml:
cluster_name: 'TestCluster'
num_tokens: 256
listen_address:
rpc_address: localhost
- seeds: "192.168.1.177,192.168.1.134"
endpoint_snitch: GossipingPropertyFileSnitch
Node-2:
cassandra-topology.properties:
192.168.1.177=DC1:RAC1
127.0.0.1=DC2:RAC2 # Also tried 192.168.1.134 ip
cassandra.yml:
cluster_name: 'TestCluster'
num_tokens: 256
listen_address:
rpc_address: localhost
- seeds: "192.168.1.177"
endpoint_snitch: GossipingPropertyFileSnitch
I can see both the nodes are up and running using 'nodetool status' command. The Keyspace i have created is as below:
> CREATE KEYSPACE testReplication WITH replication = {'class': NetworkTopologyStrategy', 'DC1' : '2', 'DC2' : '2'};
I can also create tables which gets replicated to both the nodes, but when i try to 'INSERT' or 'SELECT' on the table cqlsh gives 'NoHostAvailable:', but system.log is not showing anything about it.
Any help will be appreciated.
Thanks.