Reputation: 11
I am trying to set up a two-node Cassandra cluster on two EC2 machines in the same region & security group. Each machine has one cassandra instance running. I have chaned the cassandra.yaml file to add both of these to the same cluster. But I am not able to do so. These are the changed configuration options in the cassandra.yaml file I have made. Both the machines belong to us-east DC. (I am able to ping each other as well, just FYI). I am using Apache Cassandra version 1.1.6.
EC2 Machine1: listen_address - private ip of this machine. rpc_address - 0.0.0.0 seeds - private ip of the EC2 machine1. endpoint_snitch - Ec2Snitch (I have also tried with SimpleSnitch & Ec2MultiRegionSnitch) initial_token - first token generated by token-generator tool for two nodes. I did a nodetool move to this token for this cassandra instance.
EC2 Machine2: listen_address - private ip of this machine rpc_address - 0.0.0.0 seeds - private ip of the EC2 machine1 endpoint_snitch - Ec2Snitch (I have also tried with SimpleSnitch & Ec2MultiRegionSnitch) initial_token - second token generated by token-generator tool for two nodes. I did a nodetool move to this token for this cassandra instance.
These settings should automatically add both the cassandra instances to the same ring when restart the instances. But when I run nodetool -h localhost ring command, both the machines are running in their own cluster, not in the same.
Is there anything that I am missing in the configuration here?
Upvotes: 1
Views: 934
Reputation: 4024
I have many time created a cassandra cluster on EC2.And from your configuration setting I would suggest to change listen_address and rpc_address to the private ip of particular machines.
Upvotes: 1