Cassandra节点DN -简单2节点群集配置失败

kulphzqa  于 2023-05-12  发布在  Cassandra
关注(0)|答案(4)|浏览(283)

我创建了一个2节点的数据中心集群。由于一些混乱和过时的文档,这需要相当多的工作。现在的问题是,当我使用nodetool status命令时,远程机器的状态是DNDown Normal。根据我的理解,状态应该是UNUp 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。
请看下面的截图:

请让我知道如果我需要提供更多的信息。
谢谢你阅读这篇文章。
恕我直言

smtd7mpg

smtd7mpg1#

对于那些可能已经在谷歌上搜索并登陆这里的人:
我在尝试设置2节点版本3.9集群时遇到了这个问题。我的每台主机都有两个接口,每个主机都连接到千兆交换机(连接到其他服务器),主机还通过10-gig SFP+电缆直接连接到彼此。这个想法是,其他服务器可以通过千兆交换机查询集群,但集群本身可以通过10-gig通信。
在尝试了listen_address和broadcast_address以及broadcast_rpc_address的许多不同组合之后,我设法通过设置以下内容(基于默认的cassandra.yaml)来解决这个问题:

listen_address: (private 10-gig IP)
#broadcast_address: keep this line commented out
rpc_address: 0.0.0.0
broadcast_rpc_address: (gigabit switch IP)

运行 nodetool status 应该会显示私有IP,并显示它们都已打开。通过Java驱动程序(3.1.3)连接到其中一台主机并调用 getAllHosts 将显示两台主机在其千兆交换机IP上都可用。

f0ofjuux

f0ofjuux2#

对我来说,使用'nodetool' removenode删除有问题的节点解决了这个问题。

jyztefdp

jyztefdp3#

关闭两台计算机上的防火墙,然后尝试是否收到此错误。
或者更复杂的方法只是意味着打开某些对Cassandra节点之间的通信至关重要的端口。
一些需要注意的端口显示在以下URL中:http://docs.datastax.com/en/cassandra/2.2/cassandra/configuration/secureFireWall.html
:D

ilmyapht

ilmyapht4#

有两种方法可以做到这一点:(第二个对我来说更好)

  • 你需要Python来启动服务器。(如果你在命令行中运行cqlsh,它会告诉你缺少Python)。
  • 安装Python
  • 设置env变量(To PATH add ;.. python/bin;..cassandra/bin)
  • 打开cmd,运行以下命令:cassandra
  • 在新cmd中运行以下命令:

cassandra-cli
connect localhost /9160;

  • 连接后,您可以创建keyspace。启动新命令提示符并运行:cqlsh
  • 安装社区版本:http://www.planetcassandra.org/cassandra/安装所需版本。对于旧版本,请转到页面中的存档版本链接。

默认情况下,让安装程序为您启动服务。安装后,可以运行以下命令:cqlsh
在这种情况下,不需要显式运行Cassandra。

相关问题