News Feeds

No results for 'undefined'
Powered by Algolia

Cassandra Connection using groovy script when rpc_address is not set as

Author: Memi Sen

Originally Sourced from:

I need to access cassandra from SOUPUI

I have used the below script

import com.datastax.driver.core.Cluster;
import com.datastax.driver.core.Session;

def rs;

//create cluster for cassandra
Cluster cluster = new Cluster.Builder().addContactPoint("xxxx").withCredentials("xxxx", "xxxx").withPort(9042).build();

//get seesionm from cassandra claster
session = cluster.connect();


The issue i could see is

/etc/cassandra/default.conf/cassandra.yaml rpc_address is not configured to for security reason. It has one IP.

Please suggest me a way to connect to cassandra when rpc_address and broadcast_address is different IP