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

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. Hello Vizhub

    VizHub.com 一.介绍 Vizhub是一个使用D3.js和svg进行数据可视化的教学练三位一体的平台. 并且可以把在线编辑的代码保存到网站中. 右上角可以使用github账号登录. 二.Get ...

  2. Android开发之获取系统所有进程信息。

    最近在做一个app,有一个进程管理模块用于管理系统中正在运行的进程,并且可以关闭进程进行加速手机的功能,基本把它实现了出来.界面的效果都是自己写的,虽然有BUG,但是基本上能满足需求,后期我会改进BU ...

  3. overloading与overriding的区别

    overloading: “重载”,参数和返回值可改变. overriding: “覆盖”,重写父类的虚函数,参数和返回值必须与父类相同. 重写Overriding是父类与子类之间多态性的一种表现,重 ...

  4. Shrio02 Realm作用、自定义简洁Realm、Realm实现类使用

    1 Realm简介 1.1 Realm作用 shiro最终是通过Realm获取安全数据的(如用户.角色.权限),也就是说认证或者授权都会通过Realm进行数据操作 1.2 Realm接口 1.2.1 ...

  5. php多进程pcntl学习(二)

    多进程中数据独立,变量无法共享,所以可以使用shmop共享内存实现(cli模式不支持APC扩展),或者存储到redis这种nosql中. 下面实例,开10个进程结合redis集合,做一些简单的任务处理 ...

  6. 邮槽 匿名管道 命名管道 剪贴板 进程通讯 转自http://www.cnblogs.com/kzloser/archive/2012/11/04/2753367.html#

    邮槽 通信流程: 服务器 客户端 注意: 邮槽是基于广播通信体系设计出来的,它采用无连接的不可靠的数据传输 邮槽可以实现一对多的单向通信,我们可以利用这个特点编写一个网络会议通知系统,而且实现这一的系 ...

  7. sql拼接字符串

    update boc_loan_apply set birthday=concat(birthday,'-01');

  8. kaggle-泰坦尼克号Titanic-3

    根据以上两篇的分析,下面我们还要对数据进行处理,观察Age和Fare两个属性,乘客的数值变化幅度较大!根据逻辑回归和梯度下降的了解,如果属性值之间scale差距较大,将对收敛速度造成较大影响,甚至不收 ...

  9. CodeForces 518A Vitaly and Strings (水题,字符串)

    题意:给定两个相同长度的字符串,让你找出一个字符串,字典序在两都之间. 析:这个题当时WA了好多次,后来才发现是这么水,我们只要把 s 串加上,然后和算数一样,该进位进位,然后再和 t 比较就行. 代 ...

  10. Hello_Area_Description 任务三:Project Tango采集区域描述数据

    Permission Dialogs for Users in Java在Java中用户使用的权限对话框 Tango works by using visual cues from the devic ...