I'm inserting data in Cassandra via C++. I've got 2 datacentres and total 3 nodes distributed among the 2 datacentres(dc1 and dc2). As I'm doing some experiments, so I've stopped Cassandra on 2 of the nodes. Now when I try to write data into the one remaining node, I get errors like "no hosts available". Since in the C++ program, I've not mentioned any consistency for the write statement, then why is it not working. I had read that the default write consistency was local one, therefore I should be able to write data even when only one out of 3 nodes is up.
dc1 has 2 nodes and dc 2 has 1 node. replication strategy: network topology, dc1: 2, dc2: 1 Cassandra: 3.0.14 RHEL 6
Edit: The problem was sorted out after I changed 2 things and restarted my cluster: 1. I configured the cassandra-topology.properties. Initially it was not set with the right values. 2. I synced the time between the 3 nodes. I don't know which one(if not both) solved the problem.