Hello all,

After starting cassandra, I tried to connect to cassandra from cqlsh and
java, but it fails to do so.

Following is the error I get while trying to connect to cqlsh.

cqlsh -u sinmin -p xxxxxx
Connection error: ('Unable to connect to any servers', {'127.0.0.1':
error(111, "Tried connecting to [('127.0.0.1', 9042)]. Last error:
Connection refused")})

I have set listen_address and rpc_address in cassandra.yaml to the ip
address of server address like follows.

listen_address:192.248.15.219
rpc_address:192.248.15.219

Following is what I found from cassandra system.log.
https://gist.githubusercontent.com/cdwijayarathna/a14586a9e39a943f89a0/raw/system%20log

Following is the netstat result I got.

maduranga@ubuntu:/var/log/cassandra$ netstat
Active Internet connections (w/o servers)
Proto Recv-Q Send-Q Local Address           Foreign Address         State

tcp        0      0 ubuntu:ssh              103.21.166.35:54417
ESTABLISHED
tcp        0      0 ubuntu:1522             ubuntu:30820
 ESTABLISHED
tcp        0      0 ubuntu:30820            ubuntu:1522
ESTABLISHED
tcp        0    256 ubuntu:ssh              175.157.41.209:42435
 ESTABLISHED
Active UNIX domain sockets (w/o servers)
Proto RefCnt Flags       Type       State         I-Node   Path
unix  9      [ ]         DGRAM                    7936     /dev/log
unix  3      [ ]         STREAM     CONNECTED     11737
unix  3      [ ]         STREAM     CONNECTED     11736
unix  3      [ ]         STREAM     CONNECTED     10949
 /var/run/dbus/system_bus_socket
unix  3      [ ]         STREAM     CONNECTED     10948
unix  2      [ ]         DGRAM                    10947
unix  2      [ ]         STREAM     CONNECTED     10801
unix  3      [ ]         STREAM     CONNECTED     10641
unix  3      [ ]         STREAM     CONNECTED     10640
unix  3      [ ]         STREAM     CONNECTED     10444
 /var/run/dbus/system_bus_socket
unix  3      [ ]         STREAM     CONNECTED     10443
unix  3      [ ]         STREAM     CONNECTED     10437
 /var/run/dbus/system_bus_socket
unix  3      [ ]         STREAM     CONNECTED     10436
unix  3      [ ]         STREAM     CONNECTED     10430
 /var/run/dbus/system_bus_socket
unix  3      [ ]         STREAM     CONNECTED     10429
unix  2      [ ]         DGRAM                    10424
unix  3      [ ]         STREAM     CONNECTED     10422
 /var/run/dbus/system_bus_socket
unix  3      [ ]         STREAM     CONNECTED     10421
unix  2      [ ]         DGRAM                    10420
unix  2      [ ]         STREAM     CONNECTED     10215
unix  2      [ ]         STREAM     CONNECTED     10296
unix  2      [ ]         STREAM     CONNECTED     9988
unix  2      [ ]         DGRAM                    9520
unix  3      [ ]         STREAM     CONNECTED     8769
/var/run/dbus/system_bus_socket
unix  3      [ ]         STREAM     CONNECTED     8768
unix  2      [ ]         DGRAM                    8753
unix  2      [ ]         DGRAM                    9422
unix  3      [ ]         STREAM     CONNECTED     7000
@/com/ubuntu/upstart
unix  3      [ ]         STREAM     CONNECTED     8485
unix  2      [ ]         DGRAM                    7947
unix  3      [ ]         STREAM     CONNECTED     6712
/var/run/dbus/system_bus_socket
unix  3      [ ]         STREAM     CONNECTED     6711
unix  3      [ ]         STREAM     CONNECTED     7760
/var/run/dbus/system_bus_socket
unix  3      [ ]         STREAM     CONNECTED     7759
unix  3      [ ]         STREAM     CONNECTED     7754
unix  3      [ ]         STREAM     CONNECTED     7753
unix  3      [ ]         DGRAM                    7661
unix  3      [ ]         DGRAM                    7660
unix  3      [ ]         STREAM     CONNECTED     6490
@/com/ubuntu/upstart
unix  3      [ ]         STREAM     CONNECTED     6475

What is the issue here? Why I can't connect to Cassandra server? How can I
fix this?

Thank You!

-- 
*Chamila Dilshan Wijayarathna,*
Software Engineer
Mobile:(+94)788193620
WSO2 Inc., http://wso2.com/

Reply via email to