Originally from the User Slack
@Praveen: Hi. I have 3 nodes in a data center and one of the node was down and the application got error
com.datastax.oss.driver.api.core.servererrors.UnavailableException: Not enough replicas available for query at consistency LOCAL_ONE (1 required but only 0 alive)
While checking the cassandra-rackdc.properties I am using only DC and rack. Not using prefer_local.
Also I am using GossipingPropertyFileSnitch instead of SimpleSnitch
I created the keyspace using below SQL
CREATE KEYSPACE simple WITH replication = {'class': 'SimpleStrategy', 'replication_factor': '2'} AND durable_writes = true;
Could you please let me know where is the wrong configuration?
@Felipe_Cardeneti_Mendes: Looks ok. Maybe one of the replicas flapped down momentarily and then failed? Btw, prefer NetworkTopologyStrategy, even for single DC.
@Praveen: Thanks Felipe. I have tried this option and tried but got the same error.
Even I tried to create a new keyspace and still got the same.
Not enough replicas available for query at consistency LOCAL_ONE (1 required but only 0 alive
Am I missing something that still causing this?
@Felipe_Cardeneti_Mendes: is this a multi DC deployment by any chance?
@Praveen: No. This is not a multi-DC deployment.
cat /etc/scylla/cassandra-rackdc.properties
dc=DC01
rack=scylla-1
This is the same configuration on each node except rack changed to scylla-2 and scylla-3
DC is same as DC01
@Felipe_Cardeneti_Mendes: hum, upper case. Well, ensure all nodes are really within the same DC, and that you follow the same case for specifying the DC within your drivers. If this still persists, then trace the failing query, as this should help you understand what’s going on. If it still doesn’t help, open an issue and provide all that info.
@Praveen: Sure. Driver might not be updated with the DC info. I will try this again and let you know.
Thanks Felipe.