News Feeds

No results for 'undefined'
Powered by Algolia

Cassandra Connection using groovy script when rpc_address is not set as 0.0.0.0


Author: Memi Sen

Originally Sourced from: https://stackoverflow.com/questions/63919700/cassandra-connection-using-groovy-script-when-rpc-address-is-not-set-as-0-0-0-0

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();



//log.info(rs)

The issue i could see is

/etc/cassandra/default.conf/cassandra.yaml rpc_address is not configured to 0.0.0.0 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