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