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

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. ICG游戏:证明,先手不是必胜就是必败。

    简介: ICG游戏:Impartial Combinatorial Games,公平的组合游戏. 以下是定义,来自网络,可能不够严谨: 1.两名选手:2.两名选手轮流行动,每一次行动可以在有限合法操作 ...

  2. 323. Number of Connected Components in an Undirected Graph按照线段添加的并查集

    [抄题]: Given n nodes labeled from 0 to n - 1 and a list of undirected edges (each edge is a pair of n ...

  3. PLSQL启动很慢的问题

    最近重新做了系统,win7 64位系统上装了oracle10g,plsql10.发现plsql启动比较慢. 解决方法: 首先停止打印机服务:Print Spooler,然后将这个服务设置为手动模式.

  4. Linux mmap函数简介

    一.简介 Linux提供了内存映射函数mmap, 它把文件内容映射到一段内存上(准确说是虚拟内存上), 通过对这段内存的读取和修改, 实现对文件的读取和修改, 先来看一下mmap的函数声明: 头文件: ...

  5. entity_class实体类

    对应数据库中表,并继承基础模型类~

  6. radio单选框

    1.写 <!DOCTYPE html> <html> <head> <title></title> <script language= ...

  7. nvidia 驱动下载地址

    http://www.nvidia.com/Download/index.aspx?lang=en-us

  8. Django web 应用 http 协议 web框架

    一:什么是web 应用程序 Web应用程序是一种可以通过Web访问的应用程序,程序的最大好处是用户很容易访问应用程序,用户只需要有浏览器即可,不需要再安装其他软件 应用程序有两种模式C/S.B/S. ...

  9. iOS密码输入框的实现

    [iOS密码输入框的实现] 就是一个UITextField,把属性 UITextField.secureTextEntry设置为Yes即可.此种UI效果为iOS默认效果.

  10. eclipse中maven install提示编码GBK的不可映射字符

    今天在eclipse中使用Maven编译项目源代码时,结果如下了如下的错误 在Java源码中没有提示任何报错,即便是改掉项目编码也是不行,如下图所示: