Search code examples
linuxcassandraredhat

Setting up a multi-node Cassandra Cluster distributed across two Linux VMs


So I have followed the datastax tutorial all of today But am still unable to get my cassandra cluster up and running.

This is how my yaml file looks for both my cassandra instances:

Cluster Name: 'MyCassandraCluster'

num_tokens:256

listen_address: 9.98.171.184/9.98.171.183

rpc_address: 9.98.171.184/9.98.171.183

class_name: org.apache.cassandra.locator.SimpleSeedProvider

parameters:

-seeds:"9.98.171.184"

This is the error message I am getting for the seed node

However, when I run nodetool status it runs but only for a single node. In addition, the ip address does not look right for what I set to the listen_address

I am extremely confused and I would really appreciate any guidance/help! Thank you in advance.


Solution

  • You need to put

    listen_address: 9.98.171.183
    rpc_address: 9.98.171.183
    

    on one node and

    listen_address: 9.98.171.184
    rpc_address: 9.98.171.184
    

    on another, not two IPs on both.

    Also giving public IP to Cassandra is very bad idea in general - by default there's no authorization, anyone from public Internet can mess with your data.