1

I am trying to set up Cassandra cluster with 2 nodes on aws instance.

I have created two IP addresses using

ifconfig eth0:0 <alias_ip1> up
and ifconfig eth0:1 <alias_ip2> up

Also, I have two instances of cassandra.

In my first cassandra instance config, I have given the following things

cluster_name: 'ClusterName'
seeds: "<alias_ip1>"
listen_address: <alias_ip1>
rpc_address: <public_ip_of_aws_instance> #I want my spark program that is running on a different machine to access this cluster. So setting this.

In my second cassandra instance config, I have given the following things

cluster_name: 'ClusterName' 
seeds: "<alias_ip1>" 
listen_address:<alias_ip2> 
rpc_address: <public_ip_of_aws_instance>

When I try to start my instances, I get the following error

java.lang.RuntimeException: Unable to gossip with any seeds
at org.apache.cassandra.gms.Gossiper.doShadowRound(Gossiper.java:1336) ~[apache-cassandra-2.1.11.jar:2.1.11]
at org.apache.cassandra.service.StorageService.checkForEndpointCollision(StorageService.java:540) ~[apache-cassandra-2.1.11.jar:2.1.11]
at org.apache.cassandra.service.StorageService.prepareToJoin(StorageService.java:788) ~[apache-cassandra-2.1.11.jar:2.1.11]
at org.apache.cassandra.service.StorageService.initServer(StorageService.java:720) ~[apache-cassandra-2.1.11.jar:2.1.11]
at org.apache.cassandra.service.StorageService.initServer(StorageService.java:611) ~[apache-cassandra-2.1.11.jar:2.1.11]
at org.apache.cassandra.service.CassandraDaemon.setup(CassandraDaemon.java:387) [apache-cassandra-2.1.11.jar:2.1.11]
at org.apache.cassandra.service.CassandraDaemon.activate(CassandraDaemon.java:562) [apache-cassandra-2.1.11.jar:2.1.11]
at org.apache.cassandra.service.CassandraDaemon.main(CassandraDaemon.java:651) [apache-cassandra-2.1.11.jar:2.1.11]

java.lang.RuntimeException: Unable to gossip with any seeds at org.apache.cassandra.gms.Gossiper.doShadowRound(Gossiper.java:1336)

Am I missing something?

I checked the following link and tried to set the broadcast_address. But, it doesn't seem to be working. Apache Cassandra: Unable to gossip with any seeds

Community
  • 1
  • 1
santhosh
  • 1,894
  • 3
  • 18
  • 23

1 Answers1

0

Make sure the ports are opened in the security group. The machines in the security group have to accept connections on 7000, 9042, and 9160. If this is a proof-of-concept, just open all TCP from the security group to itself.

Also, make sure you start the seed instance 1st. Otherwise, the 2nd instance will complain it's 'unable to gossip with any seeds'.

You don't need broadcast_address if you are using internal IPs.

LHWizard
  • 2,121
  • 19
  • 30