cassandra - nodetool removenode 在删除过程中卡住

标签 cassandra

我有一个几乎是空的小集群。通常 nodetool removenode大约 10 秒完成。但是,我目前正在删除一个节点,需要 10 分钟,而且似乎没有任何进展。另一个删除节点的请求被拒绝,因为已经有一个删除正在进行。我该如何解决这个问题?作为引用,这里是 nodetool status 的输出:

Status=Up/Down
|/ State=Normal/Leaving/Joining/Moving
--  Address         Load       Tokens  Owns   Host ID                               Rack
DL  192.168.12.207  152.14 KB  256     32.2%  683d8351-c625-4d7f-99cc-61f6b73b0c56  rack1
UN  192.168.12.205  215.21 KB  256     37.2%  b66d5fff-ef1d-4fbf-a49a-43709df99a0c  rack1
UN  192.168.12.208  148.09 KB  256     30.6%  39b54771-59b8-49f7-8db8-9cf4523d6c8d  rack1

此外,cassandra 不在主机 207(离开的主机)上运行,而是在其他两台主机上运行。

编辑:似乎至少有一个 token 卡在等待复制:
$ nodetool removenode status
RemovalStatus: Removing token (-9037887679483580088). Waiting for replication confirmation from [/192.168.12.205].

最佳答案

不知道是哪个版本的 Cassandra 有问题。但是,如果 nodetool removenode 不工作,根据 Apache Cassandra Wiki ,您应该尝试以下操作:

Removenode

Removing a node that does not physically exist anymore is done in two steps:

  bin/nodetool removenode <UUID> 

  bin/nodetool removenode force

The first command will block forever if the computer attached to that UUID was physically removed (or does not run Cassandra anymore). Just click Ctrl-C after a second or two before running the second command. Obviously, it is better to first decommission a node if possible or you may lose some of your data.

The "bin/nodetool status" command shows the UUID of your nodes.



希望能帮助到你 。

关于cassandra - nodetool removenode 在删除过程中卡住,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25943261/

相关文章:

cassandra - 自动配置Opscenter以管理现有的Cassandra集群

Cassandra 错误 "Could not create the Java Virtual Machine"

java - Cassandra 批量加载器

csv - 将 .csv 文件导入 cassandra

java - Apache项目与大数据世界

Cassandra - 使用 CQL 将数据插入嵌套集合类型

database - 如果我们需要在 cassandra 和 bigcouch 之间进行选择,我们应该考虑哪个标准?

go - 在 Cassandra 中插入返回空指针错误

java - 如何使用 cassandra spring 单元执行多个测试

java - 使用 Datastax API 插入/读取 Cassandra 数据库(使用新的二进制协议(protocol))