0
votes

I am trying to set up a 3-node cassandra cluster on amazon EC2 instances yet i am having an issue while trying to startup the cluster. Here are my configuration options:

Node-1

  • private-ip a.a.a.a

  • public-ip b.b.b.b

Node-2:

  • private-ip c.c.c.c

  • public-ip d.d.d.d

Node-3:

  • private-ip e.e.e.e

  • public-ip f.f.f.f

For each node I have chosen both Node-1 and Node-2 to be seeds. Therefore on all the cassandra.yaml files i have added the nodes public IPs.

Moreover, for each instance I have set the following properties:

  • listen_address private-ip
  • broadcast_address public-ip
  • rpc_address 0.0.0.0
  • broadcast_rpc_address public-ip
  • endpoint_snitch Ec2Snitch
  • auto_bootstrap false

Yet while trying to initialize the first node, the following exception happens:

ERROR [main] 2016-12-26 17:08:55,336 CassandraDaemon.java:654 - Exception encountered during startup
java.lang.NullPointerException: null
    at org.apache.cassandra.service.StorageService.maybeAddOrUpdateKeyspace(StorageService.java:1025) ~[apache-cassandra-2.2.8.jar:2.2.8]
    at org.apache.cassandra.service.StorageService.joinTokenRing(StorageService.java:903) ~[apache-cassandra-2.2.8.jar:2.2.8]
    at org.apache.cassandra.service.StorageService.initServer(StorageService.java:647) ~[apache-cassandra-2.2.8.jar:2.2.8]
    at org.apache.cassandra.service.StorageService.initServer(StorageService.java:518) ~[apache-cassandra-2.2.8.jar:2.2.8]
    at org.apache.cassandra.service.CassandraDaemon.setup(CassandraDaemon.java:310) [apache-cassandra-2.2.8.jar:2.2.8]
    at org.apache.cassandra.service.CassandraDaemon.activate(CassandraDaemon.java:532) [apache-cassandra-2.2.8.jar:2.2.8]
    at org.apache.cassandra.service.CassandraDaemon.main(CassandraDaemon.java:641) [apache-cassandra-2.2.8.jar:2.2.8]

Any idea on what I am doing wrong?

1
Did you manage to figure out what you did to resolve this? It would be great to have closure as I am stuck in a similar situationAamir Mushtaq

1 Answers

0
votes

Can you try with rpc_address and listen_address as eth0.

We have built cassandra cluster on EC2 nodes with EC2Snitch and with eth0 and it works perfectly.