今天碰到的问题跟这个一模一样,特地转过来记录一下

https://support.datastax.com/hc/en-us/articles/204893189-CQL-query-results-in-Unable-to-complete-request-one-or-more-nodes-were-unavailable-

CQL query results in "Unable to complete request: one or more nodes were unavailable"

Summary

When querying the cluster, requests could not be completed with nodes unavailable to service the query.

Symptoms

Data Manipulation Language (DML) queries (e.g. SELECTINSERTUPDATE) against the database fail despite all nodes being operational.

Nodes can be confirmed to be operational since Data Definition Language (DDL) queries (e.g. DESCRIBEALTER) return the expected results.

Below is a sample output from a cqlsh query:

cqlsh> SELECT * FROM music.albums ;
Unable to complete request: one or more nodes were unavailable.

Cause

In this instance, the issue is a result of incorrect replication settings on the keyspace.

The sample nodetool status output shows that there is a single-datacentre named Cassandra:

Datacenter: Cassandra 
=====================
Status=Up/Down
|/ State=Normal/Leaving/Joining/Moving
-- Address Load Tokens Owns Host ID Rack
UN 10.0.1.2 1.67 GB 256 36.8% 109dc707-1df2-4f50-9ec5-d611f1772f5a RAC1
UN 10.0.1.3 1.66 GB 256 30.0% a88a9570-9ead-4cdd-a81b-daf68013f8ab RAC1
UN 10.0.1.4 1.66 GB 256 33.2% 239d8975-1783-4935-addb-691173214045 RAC1

However, the music keyspace in the example above shows that the data is replicated to a non-existent datacentre named DC1:

cqlsh> DESCRIBE KEYSPACE music ;

CREATE KEYSPACE music WITH replication = { 
'class': 'NetworkTopologyStrategy',
'DC1': '3'
};
...

Solution

Update the replication settings on the keyspace with the correct datacentre name.

Getting Cassandra datacenter name in cqlsh

cqlsh> use system;
cqlsh:system> select data_center from local; data_center
-------------
datacenter1

Step 1 - Alter the keyspace definition:

cqlsh> ALTER KEYSPACE music WITH replication = { 
'class': 'NetworkTopologyStrategy',
'Cassandra': '3'
};

Step 2 - (OPTIONAL) It may also be necessary to run a rolling repair around the ring:

$ nodetool repair -pr -- music

See also

KB article - Read and login failures after updating keyspace replication

[转载] cassandra Unable to complete request: one or more nodes were unavailable的更多相关文章

  1. windows上zend server安装 报The server encountered an internal error or misconfiguration and was unable to complete your request -解决方法 摘自网络

    windows上zend server安装完成后报如下错误:   Internal Server Error The server encountered an internal error or m ...

  2. 【MyEcplise】导入项目后,会定时弹出一下错误MyEcplise tern was unable to complete your request in time.This couble happen if your project contains several large javaScript libraies.

    Myecplise弹出错误如下: 错误代码: MyEcplise tern was unable to complete your request in time.This couble happen ...

  3. PHP错误The server encountered an internal error or misconfiguration and was unable to complete your re

    我的笔记本电脑上的环境安装了很多次,但是运行项目时总是会报The server encountered an internal error or misconfiguration and was un ...

  4. Unable to complete the scan for annotations for web application [/wrs] due to a StackOverflowError. Possible root causes include a too low setting for -Xss and illegal cyclic inheritance dependencies.

    tomcat启动报错:Jul 20, 2018 11:48:37 AM org.apache.catalina.core.ContainerBase addChildInternalSEVERE: C ...

  5. Could not complete request

    Could not complete request com.alibaba.dubbo.rpc.RpcException: Forbid consumer 10.254.1.26 access se ...

  6. Unable to parse request org.apache.commons.fileupload.FileUploadBase$IOFileUploadException: Processing of multipart/form-data request failed. null

    最近做一个web项目中有上传文件的功能,已经写出并在本地和部署到服务器上测试了好几个文件上传都没问题(我用的是tomcat).部署上服务器,上传图片时有的图片大就回在tomcat日志报如下错误: Un ...

  7. Unable to process request: General SSLEngine problem.Unable to connect to neo4j at `localhost:7687`, because the certificate the server uses has changed.

    Exception in thread "main" org.neo4j.driver.v1.exceptions.ClientException: Unable to proce ...

  8. Caused by: java.lang.IllegalStateException: Unable to complete the scan for annotations for web application [/Cppcc] due to a StackOverflowError. Possible root causes include a too low setting for -Xs

    解决办法:(1)修改D:\Java\apache-tomcat-7.0.88\conf\catalina.properties (122line) (2)如org.apache.catalina.st ...

  9. tomcat启动时检测到循环继承而栈溢出的问题:Caused by: java.lang.IllegalStateException: Unable to complete the scan for annotations for web application [/test] due to a StackOverflowError. Possible root causes include

    最近在公司更新一个老项目的时候,发现部署项目后tomcat报错,错误如下: Caused by: java.lang.IllegalStateException: Unable to complete ...

随机推荐

  1. Create a Basic Shader in Shader Forge

    [Create a Basic Shader in Shader Forge] 1.打开ShaderForge.Window-> Shader Forge.(打开速度较慢) 2.通过NewSha ...

  2. gorm中自己写sql的方法实现

    type Result struct { Total int } var result Result //当天修改作业的总时间:分钟 dao.DB(dao.HomeworkTable).Raw(&qu ...

  3. C++:初始化列表

    有两种原因需要使用初始化列表: 让我们先看一下第一个原因——必要性.(1)对另一个类成员的初始化,(2)成员是一个常量对象,(3)成员是引用.根本原因:编译器总是确保所有成员对象在构造函数体执行之前( ...

  4. SqlMapConfig.xml配置文件中的properties属性

    1.原始的SqlMapConfig.xml配置文件的内容为: <?xml version="1.0" encoding="UTF-8" ?> < ...

  5. Linux服务器上日志报com.mysql.jdbc.PacketTooBigException: Packet for query is too large (1783 > 1024). You can change this value on the server by setting the max_allowed_packet' variable.

    在做查询数据库操作时,报了以上错误,还有out of memery heap hacp ,原因是MySQL的max_allowed_packet设置过小引起的,我一开始设置的是1M,后来改为了20M ...

  6. 安装wampserver后,在www文件夹下面写php文件,而在网页里输入localhost而无法打开php文件时解决办法汇总

    wampserver安装后,在www文件夹下面写入xx.PHP文件,然后在网页里输入localhost:xx.PHP. 你可能会遇到如下三种情况: 情形一:网页上显示空白,按F12,出现404的错误. ...

  7. centos下修改文件后如何保存退出

    centos下修改文件后如何保存退出 保存命令 按ESC键 跳到命令模式,然后: :w 保存文件但不退出vi :w file 将修改另外保存到file中,不退出vi :w! 强制保存,不推出vi :w ...

  8. 用word2016 写CSDN 博客

    目前大部分的博客作者在用Word写博客这件事情上都会遇到以下3个痛点: 1.所有博客平台关闭了文档发布接口,用户无法使用Word,Windows Live Writer等工具来发布博客.使用Word写 ...

  9. ## 20155336 2016-2017-2《JAVA程序设计》第八周学习总结

    20155336 2016-2017-2<JAVA程序设计>第八周学习总结 教材学习内容总结 第14章 NIO与NIO2 NIO简介 NIO使用频道来衔接数据结点,在处理数据时,NIO可以 ...

  10. 个人项目-词频统计(语言:C++)

    词频统计 (个人项目) 要求 (1). 实现一个控制台程序,给定一段英文字符串,统计其中各个英文单词(4字符以上含4字符)的出现频率. 附加要求:读入一段文本文件,统计该文本文件中单词的频率. (2) ...