datastax集群尝试连接一个死节点
datastax cluster try to connect a dead node
当我启动集群时,我可以在日志中看到它总是尝试连接到一个我什至找不到的死节点。
奇怪的是,当我运行 nodetool ring 或 nodetool status 时,我再也找不到这个死主机了。这意味着我无法通过执行 nodetool removenode 来删除它。
我猜其他人已将此节点添加到集群中,但我不知道它是如何被删除的。
我该如何解决?
非常感谢!
nodetool removenode
在过去被证明是有问题的,有几种方法可以解决这个问题。
你用的是哪个版本?如果你是运行新的2.2版本,可以使用nodetool assassinate
:
$ nodetool -u cassandra -pw cassandra assassinate 10.0.0.100
基本上,由于 CASSANDRA-7935. If you are running on a version prior to 2.2, you can force the removal of a node via the JMX Term tool (as documented here,它被提升为 2.2 版的 nodetool 命令,这已经足够了:
$>open localhost:7199
#Connection to localhost:7199 is opened
$>bean org.apache.cassandra.net:type=Gossiper
#bean is set to org.apache.cassandra.net:type=Gossiper
$>run unsafeAssassinateEndpoint 10.0.0.100
#calling operation unsafeAssassinateEndpoint of mbean org.apache.cassandra.net:type=Gossiper
#operation returns:
null
$>quit
#bye
当我启动集群时,我可以在日志中看到它总是尝试连接到一个我什至找不到的死节点。 奇怪的是,当我运行 nodetool ring 或 nodetool status 时,我再也找不到这个死主机了。这意味着我无法通过执行 nodetool removenode 来删除它。 我猜其他人已将此节点添加到集群中,但我不知道它是如何被删除的。 我该如何解决? 非常感谢!
nodetool removenode
在过去被证明是有问题的,有几种方法可以解决这个问题。
你用的是哪个版本?如果你是运行新的2.2版本,可以使用nodetool assassinate
:
$ nodetool -u cassandra -pw cassandra assassinate 10.0.0.100
基本上,由于 CASSANDRA-7935. If you are running on a version prior to 2.2, you can force the removal of a node via the JMX Term tool (as documented here,它被提升为 2.2 版的 nodetool 命令,这已经足够了:
$>open localhost:7199
#Connection to localhost:7199 is opened
$>bean org.apache.cassandra.net:type=Gossiper
#bean is set to org.apache.cassandra.net:type=Gossiper
$>run unsafeAssassinateEndpoint 10.0.0.100
#calling operation unsafeAssassinateEndpoint of mbean org.apache.cassandra.net:type=Gossiper
#operation returns:
null
$>quit
#bye