Search code examples
cassandranosqldatastaxcassandra-3.0

Unable to establish connection, All host(s) tried for query failed


i know this may be basic problem but as i am new to cassandra and did not find solution of it anywhere so When i am trying to make connection in DataStax Dev Center to cassandra server, it is giving me below exception.

enter image description here

Below is system configuration:

Operating System: Windows 10 pro(64- Bit)

apache-cassandra-3.11.2

Below is cassandra.yaml configuration:

start_native_transport: true

broadcast_rpc_address: 1.2.3.4

native_transport_port_ssl: 9142

listen_address: 192.168.2.22

rpc_address: 192.x.x.x

I have done these changes in cassandra.yaml file: start_rpc: true rpc_port: 9042

when running this command on cmd: nodetool -h localhost -p 9042 status

getting this error: Failed to connect to 'localhost:9042' - ConnectIOException: 'non-JRMP server at remote endpoint'.

Any help would be appreciated.


Solution

  • I have found answer of this question and below are configurations which need to configure once you install Cassandra for first time:

    broadcast_rpc_address: 192.168.2.22(ip address of system on which Cassandra is installed
    
    rpc_address: 0.0.0.0