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

Cassandra节点DN-简单2节点群集配置失败,cassandra,Cassandra,我创建了一个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:5

我创建了一个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
不会持续输出此信息

还有,如果不清楚的话。如果我正在从机器上运行
nodetool status
程序。我运行它的机器正常运行,但远程机器总是正常运行。但两台机器都显示其状态正常。运行命令的机器将其地址列为环回地址,远程地址列为10.x.x.x类型的内部企业LAN地址。远程计算机始终显示DN

请参见下面的屏幕截图:

如果我需要提供更多信息,请告诉我

谢谢你阅读这篇文章

恭敬地


me

关闭两台计算机上的防火墙,然后在收到此错误时重试

或者更复杂的方法仅仅意味着打开某些对Cassandra节点之间的通信至关重要的端口

要注意的一些端口显示在此URL中:


:D

有两种方法可以做到这一点:(第二种更适合我)

  • 您需要Python来启动服务器。(如果在命令行中运行cqlsh,它会告诉您缺少Python)

    • 安装Python
    • 设置环境变量(到路径add;.python/bin;.cassandra/bin)
    • 打开cmd,运行以下命令:
      cassandra

    • 在新cmd中运行以下命令:

    cassandra cli

    connectlocalhost/9160

    • 连接后,可以创建键空间。 启动新命令提示符并运行:
      cqlsh
  • 只需安装社区版本: 安装所需的版本。对于旧版本,请转到页面中的存档版本链接

    默认情况下,让安装为您启动服务。安装后,可以运行以下命令:
    cqlsh


  • 在这种情况下,无需显式运行Cassandra。

    对于其他可能在谷歌上搜索并登陆此处的用户:

    我在尝试设置2节点版本3.9群集时遇到此问题。我的每台主机都有两个接口,每台主机连接到一个千兆交换机(该交换机连接到其他服务器),另外两台主机通过一根10 gig SFP+电缆直接连接到彼此。其想法是,其他服务器可以通过千兆交换机查询集群,但集群本身可以通过10Gig进行通信

    在尝试了listen_address和broadcast_address以及broadcast_rpc_address的多种不同组合后,我通过设置以下内容(基于默认的cassandra.yaml)成功地解决了这个问题:


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

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

    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)