1

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?

5
  • Had you open the firewall between the 2 machines for Cassandra communication ? Commented Dec 27, 2012 at 7:44
  • Yes I have opened the firewall. They belong to the same security group. Commented Dec 27, 2012 at 8:15
  • Is the cluster name same in both the yaml files? Commented Dec 27, 2012 at 10:13
  • Yes, the cluster name is same as well. the default 'Test Cluster'. Commented Dec 27, 2012 at 12:02
  • 1
    Having both instances under the same security group is not enough - AWS policy is to deny group members internal communication unless implicitly specified. Make sure this SG allows incoming connections to the Casandra ports originating from that SG. Commented Dec 28, 2012 at 8:44

1 Answer 1

1

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.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.