title: Cassandra UnavailableException: Cannot achieve consistency level LOCAL_ONE
body: <p>I have a 3-node Cassandra cluster with a keyspace that has a replication factor of 3: </p>
  
  <pre><code>CREATE KEYSPACE demo
    WITH REPLICATION = {
      'class':'SimpleStrategy',
      'replication_factor':3
    };
  </code></pre>
  
  <p>(Deployed in just one data center)</p>
  
  <p>When doing failure testing, ie taking one node down, I'm getting these exceptions when attempting queries against my keyspace:</p>
  
  <pre><code> Caused by: org.apache.cassandra.exceptions.UnavailableException: Cannot achieve consistency level LOCAL_ONE
      at org.apache.cassandra.db.ConsistencyLevel.assureSufficientLiveNodes(ConsistencyLevel.java:296) ~[apache-cassandra-3.10.jar:3.10]
      at org.apache.cassandra.service.AbstractReadExecutor.getReadExecutor(AbstractReadExecutor.java:162) ~[apache-cassandra-3.10.jar:3.10]
      at org.apache.cassandra.service.StorageProxy$SinglePartitionReadLifecycle.&lt;init&gt;(StorageProxy.java:1774) ~[apache-cassandra-3.10.jar:3.10]
      at org.apache.cassandra.service.StorageProxy.fetchRows(StorageProxy.java:1736) ~[apache-cassandra-3.10.jar:3.10]
      at org.apache.cassandra.service.StorageProxy.readRegular(StorageProxy.java:1682) ~[apache-cassandra-3.10.jar:3.10]
      at org.apache.cassandra.service.StorageProxy.read(StorageProxy.java:1597) ~[apache-cassandra-3.10.jar:3.10]
      at org.apache.cassandra.db.SinglePartitionReadCommand$Group.execute(SinglePartitionReadCommand.java:997) ~[apache-cassandra-3.10.jar:3.10]
      at org.apache.cassandra.cql3.statements.SelectStatement.execute(SelectStatement.java:277) ~[apache-cassandra-3.10.jar:3.10]
      at org.apache.cassandra.cql3.statements.SelectStatement.execute(SelectStatement.java:247) ~[apache-cassandra-3.10.jar:3.10]
      at org.apache.cassandra.auth.CassandraRoleManager.getRoleFromTable(CassandraRoleManager.java:521) ~[apache-cassandra-3.10.jar:3.10]
      at org.apache.cassandra.auth.CassandraRoleManager.getRole(CassandraRoleManager.java:503) ~[apache-cassandra-3.10.jar:3.10]
      ... 47 common frames omitted
  </code></pre>
  
  <p>I'm not sure why I'm seeing this error because:</p>
  
  <ol>
  <li>My replication factor is set to 3 (ie I still have 2 nodes up that each contain all of the data)</li>
  <li>My consistency level is set to QUORUM. (Why am I seeing LOCAL_ONE?)</li>
  </ol>