Not enough replica available for query at consistency ONE (1 required but only 0 alive)

前端 未结 4 1461
囚心锁ツ
囚心锁ツ 2021-02-02 08:11

I have a Cassandra cluster with three nodes, two of which are up. They are all in the same DC. When my Java application goes to write to the cluster, I get an error in my applic

4条回答
  •  既然无缘
    2021-02-02 08:25

    in my case, I got a message 0 available, but cassandra was up and cqlsh worked correctly, the problem was accessing from java: query was for a complete table, and some records were not accesible (all nodes containing them down). From cqlsh, select * from table works, only shows accesible records. So, the solution is to recover down nodes, and maybe to change replication factors with:

     ALTER KEYSPACE ....
    nodetool repair -all 
    

    then nodetool status to see changes and cluster structure

提交回复
热议问题