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

时间:2015-10-20 17:44:42

标签: cassandra

我创建了一个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程序。我运行它的机器是Up Normal,但远程机器总是Down Normal。但两台机器都显示其状态为Up Normal。我运行命令的机器将其地址列为环回地址,将远程地址列为10.x.x.x类型的内部企业LAN地址。远程机器始终显示DN。

请参阅以下屏幕截图:

nodetool in action - localhost UN - remote - DN

如果我需要提供更多信息,请与我们联系。

感谢您阅读本文。

此致,

4 个答案:

答案 0 :(得分:2)

对我来说,使用“ nodetool” removenode移除有问题的节点即可解决问题。

答案 1 :(得分:1)

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

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

    • 安装Python
    • 设置env变量(To PATH add; .. python / bin; .. cassandra / bin)
    • 打开cmd,运行以下命令: cassandra

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

    cassandra-cli

    connect localhost /9160;

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

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

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

答案 2 :(得分:1)

对于其他可能使用Google搜索并登陆此处的人:

我在尝试设置2节点版本3.9群集时遇到了此问题。我的每台主机都有两个接口,每个主机连接到千兆交换机(连接到其他服务器),主机还通过10Gig 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上可用。

答案 3 :(得分:0)

关闭两台计算机上的防火墙,然后尝试接收此错误。

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

此网址显示了一些需要注意的端口:http://docs.datastax.com/en/cassandra/2.2/cassandra/configuration/secureFireWall.html

:d