0
votes

I am setting up two nodes, one node where cassandra is running and other node where my spring-boot service is running which uses cassandra database. I am unable to connect to the cassandra node from other service node(tried with- telnet 'cassandra node ip' 'cassandra port number'). I tried with modifying cassandra.yml. I changed "listen_address" and "rpc_address" to node address but cassandra is not starting with this configuration(Connection refused). Is there any other configuration i need to do? Java version-8, Cassandra version- 3.11.4.

1

1 Answers

3
votes

If you can't telnet to it, then you definitely won't be able to connect to it. Are you sure there are no firewalls in place? On the cassandra server you're trying to telnet to, can you run:

netstat -nap | grep 9042 | grep LISTEN

Whatever port you specified for your native_transport_port in cassandra.yaml.

or

lsof -i TCP | grep cassandraPid | grep LISTEN"

Where the "cassandraPid" is the process ID of the cassandra process

Can you connect using cqlsh on the cassandra host when specifying the host and port? If you can, then there is a firewall blocking your client server. If not, then again, check your port settings.