如何重启 Cassandra EC2 实例?

How to restart Cassandra EC2 instance?

我在 AWS 上有 Cassandra 集群。我拥有它只是为了测试目的。因此,我需要停止我的实例并在其他时间启动它们。我用 Datastax AMI 部署了集群,一切似乎都很好。我在 EC2 管理控制台中停止了实例并等待 'stoped' 状态。之后我开始了他们。我连接到他们,但 Cassandra 没有工作。命令 nodetool 无法到达 localhost:7199。 AWS 上的安全组允许所有入站和出站流量。我尝试 sudo service cassandra start,但我得到了同样的错误。

我需要在不对它们进行手动操作的情况下启动集群的所有节点。

啊。您从 EC2 管理控制台 停止了实例 。这从临时存储中删除了所有内容。您应该只在必要时重新启动实例,但永远不要停止它们。或者使用sudo service dse restart只重启dse服务,不重启整个实例。现在我建议你最好的选择是从头开始重新部署集群(或至少这个节点)....

以下是对实例存储(临时存储)的一些解释:http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/InstanceStorage.html

The data in an instance store persists only during the lifetime of its associated instance. If an instance reboots (intentionally or unintentionally), data in the instance store persists. However, data on instance store volumes is lost under the following circumstances:

Failure of an underlying drive

Stopping an Amazon EBS-backed instance

Terminating an instance

Datastax 使用临时存储来存储数据和提交日志,因为这种存储比 ebs 存储快得多。此处有更多详细信息:http://datastax.com/documentation/datastax_enterprise/4.6/datastax_enterprise/install/installAMI.html