Thursday, March 27, 2014

How to connect to Cassandra server running in Amazon EC2 using Cassandra client in local environment?

Below steps need to be followed, if you want to connect to Cassandra instance running in Amazon EC2 using the Cassandra client running in local environment.

  1. Goto EC2 Management Console
  2. Click on Security Groups under Network and Security on the left menu
  3. Select your Security Group associated with your instance and click on Inbound Tab
  4. Find out what is the source for ALL Port (Service). If the source is sg-xxxxxxxx, then delete the same.
  5. Add a new rule by selecting the below options: Create a new rule: All Traffic Source: 0.0.0.0/0
  6. Add Rule and click on Apply Rule changes
  7. To verify if you are able to connect to Cassandra server, run the cassandra client from your local machine like below:
cassandra-cli -host ec2-XX-XXX-XX-XXX.us-west-2.compute.amazonaws.com -port 9160

No comments:

Post a Comment