chanti king
chanti king

Reputation: 83

Remote access in Apache Cassandra

I Have two machines installed apache cassandra, with IPs (192.168.1.101 and 192.168.1.102).

I want to remote login from 192.168.1.102 to 192.168.1.101

I edited rpc_address= 0.0.0.0 and cassandra.yaml file in 192.168.1.101

When iam trying to connect from 192.168.1.102 using

cqlsh 192.168.1.101 9061

iam getting error like this

Connection error: ('Unable to connect to any servers', {'192.168.1.107': 
error(111, "Tried connecting to [('192.168.1.107', 9160)]. Last error: 
Connection refused")})

Is there anything configuration i want to do in 192.168.1.102 or i missed anything.

Please help me

Thanks in advance

Upvotes: 2

Views: 1348

Answers (1)

shutty
shutty

Reputation: 3348

I see multiple issues here:

  1. Cqlsh uses port 9042 to access cassandra, not 9061. It's declared in cassandra.yaml as native_transport_port
  2. By default Cassandra listens for CQL connections only on localhost. See listen_address in cassandra.yaml and set it to node's public IP address.

I suggest:

  • double-check cassandra logs that it completed the startup without errors.
  • try to connect to localhost with cqlsh

Upvotes: 1

Related Questions