Angelos Kapsimanis
Angelos Kapsimanis

Reputation: 999

Cassandra is not starting

I am having trouble with a 3-node Cassandra cluster on AWS. There is one seed node and two data nodes. The nodes are crashing when they are launched and when I am trying to start them manually.

The error message appears in all three nodes.

Cassandra's version is 2.0.9

I have tried the following settings:

- class_name: org.apache.cassandra.locator.SimpleSeedProvider
  parameters:
      - seeds: "<seed.node.public.IP>"

rpc_address: <node.public.IP>

rpc_port: 9160

listen_address: (or with the node's public IP)

storage_port: 7000

endpoint_snitch: SimpleSnitch (and RackInferringSnitch as well).

The error message is

 ERROR [main] 2014-09-29 08:59:45,241 CassandraDaemon.java (line 513) Exception  encountered during startup
 java.lang.RuntimeException: Unable to gossip with any seeds
  at org.apache.cassandra.gms.Gossiper.doShadowRound(Gossiper.java:1200)
  at org.apache.cassandra.service.StorageService.checkForEndpointCollision   (StorageService.java:446)
  at org.apache.cassandra.service.StorageService.prepareToJoin(StorageService.java:657)
  at org.apache.cassandra.service.StorageService.initServer(StorageService.java:611)
  at org.apache.cassandra.service.StorageService.initServer(StorageService.java:504)
  at org.apache.cassandra.service.CassandraDaemon.setup(CassandraDaemon.java:378)
  at org.apache.cassandra.service.CassandraDaemon.activate(CassandraDaemon.java:496)
  at org.apache.cassandra.service.CassandraDaemon.main(CassandraDaemon.java:585)

Ports 7000, 7001, 7199, 8080, 9042, 9160, 61620 and 61621 are open within the Cluster's security group.

I have also read and tried the solutions given on the following links:

Cassandra Not Starting Up

Starting cassandra as a service does not work for 2.0.5, sudo cassandra -f works

Apache Cassandra: Unable to gossip with any seeds

Datastax Enterprise is crashing with Unable to gossip with any seeds error

https://github.com/Netflix/Priam/issues/313

Upvotes: 3

Views: 5928

Answers (1)

Angelos Kapsimanis
Angelos Kapsimanis

Reputation: 999

Cassandra can not bind to the public IP address in EC2.

Replacing it with the public DNS or the private IP address in listen_address, rpc_address and seeds.

The public DNS is resolving to the private IP address which is the eth0 intherface on EC2 instances, where Cassandra is binding.

The working configuration is:

- class_name: org.apache.cassandra.locator.SimpleSeedProvider
  parameters:
     - seeds: "<seed.node.public.DNS>"

  rpc_address: <node.public.DNS>

  rpc_port: 9160

  listen_address: (or with the node's public DNS)

  storage_port: 7000

  endpoint_snitch: SimpleSnitch (and RackInferringSnitch as well).

Upvotes: 4

Related Questions