我创建了一个2节点的数据中心集群。由于一些混乱和过时的文档,这需要相当多的工作。现在的问题是,当我使用nodetool status
命令时,远程机器的状态是DN
或Down Normal
。根据我的理解,状态应该是UN
或Up Normal
。
还有,有趣的是,我收到了这个恒定的服务器输出:
WARN 17:31:51 CassandraRoleManager skipped default role setup: some nodes were not ready
INFO 17:31:51 Setup task failed with error, rescheduling
WARN 17:32:01 CassandraRoleManager skipped default role setup: some nodes were not ready
INFO 17:32:01 Setup task failed with error, rescheduling
WARN 17:32:11 CassandraRoleManager skipped default role setup: some nodes were not ready
INFO 17:32:11 Setup task failed with error, rescheduling
WARN 17:32:21 CassandraRoleManager skipped default role setup: some nodes were not ready
INFO 17:32:21 Setup task failed with error, rescheduling
WARN 17:32:31 CassandraRoleManager skipped default role setup: some nodes were not ready
INFO 17:32:31 Setup task failed with error, rescheduling
WARN 17:32:41 CassandraRoleManager skipped default role setup: some nodes were not ready
INFO 17:32:41 Setup task failed with error, rescheduling
WARN 17:32:51 CassandraRoleManager skipped default role setup: some nodes were not ready
INFO 17:32:51 Setup task failed with error, rescheduling
WARN 17:33:01 CassandraRoleManager skipped default role setup: some nodes were not ready
INFO 17:33:01 Setup task failed with error, rescheduling
WARN 17:33:11 CassandraRoleManager skipped default role setup: some nodes were not ready
INFO 17:33:11 Setup task failed with error, rescheduling
WARN 17:33:21 CassandraRoleManager skipped default role setup: some nodes were not ready
INFO 17:33:21 Setup task failed with error, rescheduling
WARN 17:33:31 CassandraRoleManager skipped default role setup: some nodes were not ready
INFO 17:33:31 Setup task failed with error, rescheduling
WARN 17:33:41 CassandraRoleManager skipped default role setup: some nodes were not ready
INFO 17:33:41 Setup task failed with error, rescheduling
WARN 17:33:51 CassandraRoleManager skipped default role setup: some nodes were not ready
INFO 17:33:51 Setup task failed with error, rescheduling
WARN 17:34:01 CassandraRoleManager skipped default role setup: some nodes were not ready
INFO 17:34:01 Setup task failed with error, rescheduling
此输出在不是seed
的计算机上。主seed
不会不断输出此。
如果不清楚的话。如果我从机器上运行nodetool status
程序。我运行它的机器是正常的,但远程机器总是正常的。但两台计算机都显示其状态为“正常运行”。我运行命令的机器将其地址列为环回地址,将远程地址列为10.x.x.x类型的内部企业LAN地址。远程计算机始终显示DN。
请看下面的截图:
请让我知道如果我需要提供更多的信息。
谢谢你阅读这篇文章。
恕我直言
我
4条答案
按热度按时间smtd7mpg1#
对于那些可能已经在谷歌上搜索并登陆这里的人:
我在尝试设置2节点版本3.9集群时遇到了这个问题。我的每台主机都有两个接口,每个主机都连接到千兆交换机(连接到其他服务器),主机还通过10-gig SFP+电缆直接连接到彼此。这个想法是,其他服务器可以通过千兆交换机查询集群,但集群本身可以通过10-gig通信。
在尝试了listen_address和broadcast_address以及broadcast_rpc_address的许多不同组合之后,我设法通过设置以下内容(基于默认的cassandra.yaml)来解决这个问题:
运行 nodetool status 应该会显示私有IP,并显示它们都已打开。通过Java驱动程序(3.1.3)连接到其中一台主机并调用 getAllHosts 将显示两台主机在其千兆交换机IP上都可用。
f0ofjuux2#
对我来说,使用'nodetool' removenode删除有问题的节点解决了这个问题。
jyztefdp3#
关闭两台计算机上的防火墙,然后尝试是否收到此错误。
或者更复杂的方法只是意味着打开某些对Cassandra节点之间的通信至关重要的端口。
一些需要注意的端口显示在以下URL中:http://docs.datastax.com/en/cassandra/2.2/cassandra/configuration/secureFireWall.html
:D
ilmyapht4#
有两种方法可以做到这一点:(第二个对我来说更好)
cassandra
cassandra-cli
connect localhost /9160;
cqlsh
默认情况下,让安装程序为您启动服务。安装后,可以运行以下命令:
cqlsh
在这种情况下,不需要显式运行Cassandra。