2

我创建了 3 个实例,其中 3 个弹性 IP 地址指向这些实例。

我做了 dsc 的 yum 安装:dsc12.noarch 1.2.13-1 @datastax

并且 /etc/cassandra/default.conf/cassandra.yaml 具有: - 种子:[弹性 IP 列表]

但是当我通过“service cassandra start”启动 cassandra 时,我在 /var/log/cassandra/cassandra.log 中看到:... 启动过程中遇到异常:无法联系任何种子!...果然“nodetool status”显示:无法连接到'127.0.0.1:7199':连接被拒绝

但是:如果我将种子的值更改为使用实例的“私有 IP”,cassandra 就可以正常启动。我希望它与 Elastic IP 一起工作得很好,但事实并非如此。

你知道这是为什么吗?

我希望弹性 IP 工作的原因是我提前知道 IP 地址,因此当我使用 Puppet 配置机器时,我可以在 cassandra.yaml 文件中预先填充种子。直到机器启动后我才知道私有 IP 地址:(

这几乎是以下内容的副本:Cassandra on Amazon EC2 with Elastic IP addresses

4

1 回答 1

6

我相信您的问题来自种子 IP 与节点的广播 IP 不同。要更改这一点,请修改每个 Cassandra.yamls 中的以下行

# Address to broadcast to other Cassandra nodes
# Leaving this blank will set it to the same value as listen_address
broadcast_address: <node's elastic ip> #uncomment this line
于 2014-01-27T20:57:29.597 回答