Cassandra nodetool退役

时间:2017-01-05 06:07:43

标签: cassandra datastax datastax-enterprise cassandra-2.1 nodetool

我希望退出cassandra节点,因为该节点需要升级操作系统。

我登录到该节点。执行decommission命令,几分钟后我在控制台上获得此异常

nodetool decommission

error: Stream failed
-- StackTrace --
org.apache.cassandra.streaming.StreamException: Stream failed
    at org.apache.cassandra.streaming.management.StreamEventJMXNotifier.onFailure(StreamEventJMXNotifier.java:85)
    at com.google.common.util.concurrent.Futures$4.run(Futures.java:1172)
    at com.google.common.util.concurrent.MoreExecutors$SameThreadExecutorService.execute(MoreExecutors.java:297)
    at com.google.common.util.concurrent.ExecutionList.executeListener(ExecutionList.java:156)
    at com.google.common.util.concurrent.ExecutionList.execute(ExecutionList.java:145)
    at com.google.common.util.concurrent.AbstractFuture.setException(AbstractFuture.java:202)
    at org.apache.cassandra.streaming.StreamResultFuture.maybeComplete(StreamResultFuture.java:208)
    at org.apache.cassandra.streaming.StreamResultFuture.handleSessionComplete(StreamResultFuture.java:184)
    at org.apache.cassandra.streaming.StreamSession.closeSession(StreamSession.java:412)
    at org.apache.cassandra.streaming.StreamSession.onError(StreamSession.java:507)
    at org.apache.cassandra.streaming.StreamSession.start(StreamSession.java:229)
    at org.apache.cassandra.streaming.StreamCoordinator$StreamSessionConnector.run(StreamCoordinator.java:208)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
    at java.lang.Thread.run(Thread.java:745)

我不确定该异常是什么意思,我打算通过 nodetool netstats nodetool status 来验证退役是否成功。在两个地方都说离开,我如何确认它是否完整。

nodetool netstats
Mode: LEAVING
Not sending any streams.
Read Repair Statistics:
Attempted: 1
Mismatch (Blocking): 0
Mismatch (Background): 0
Pool Name                    Active   Pending      Completed
Commands                        n/a         0             26
Responses                       n/a         0         758780

nodetool status
Datacenter: DC1
===============
Status=Up/Down
|/ State=Normal/Leaving/Joining/Moving
--  Address     Load       Tokens  Owns    Host ID                               Rack
UL  x.x.x.x  1.02 MB    256     ?       377869a9-d01c-4b7d-a24c-dbb90afee3d8  RAC1

我的cassandra版本是2.1.8。找到了一个参考错误https://issues.apache.org/jira/browse/CASSANDRA-10371,它表示可能需要72小时才能反映更改。

我应该assassinate the node

中提到Removing a node doc

1 个答案:

答案 0 :(得分:3)

如果您未在nodetool status中看到该节点,则会确认其已完成。如果没有,那么您可以尝试nodetool removenode从群集中删除该节点。 nodetool assassinate是您从群集中删除节点的最后一个选项。如果nodetool removenode无法从群集中删除该节点,则我们会使用nodetool assassinate删除节点。

错误问题:要查看此错误的更多详细信息,请cat /install_directory/apache-cassandra-2.1.8/logs/system.log | grep ERROR

您的节点无法与其他节点流式传输数据。出现这种类型的问题有很多原因,例如:用户进程限制(nproc)。查找有关您的问题的更多详细信息,以找出错误原因。