Are you sure your node is up? Do you get a result when running “nodetool –h 
192.248.15.219 status”?

From: Chamila Wijayarathna [mailto:cdwijayarat...@gmail.com]
Sent: Sunday, July 19, 2015 1:53 PM
To: user@cassandra.apache.org
Subject: Re: Can't connect to Cassandra server

Hi Umang,

Tried your suggestion, but still getting the same error.

Thanks.

On Sun, Jul 19, 2015 at 3:12 PM, Umang Shah 
<shahuma...@gmail.com<mailto:shahuma...@gmail.com>> wrote:
You also have to change the same IP which is 192.248.15.219 for seeds inside 
cassandra.yaml file.

then try to connect, it will work.

Thanks,
Umang Shah

On Sun, Jul 19, 2015 at 1:52 AM, Chamila Wijayarathna 
<cdwijayarat...@gmail.com<mailto:cdwijayarat...@gmail.com>> wrote:
Hi Ajay,

I tried that also, but still getting the same result.

On Sun, Jul 19, 2015 at 2:08 PM, Ajay 
<ajay.ga...@gmail.com<mailto:ajay.ga...@gmail.com>> wrote:
Try with the correct IP address as below:

cqlsh 192.248.15.219 -u sinmin -p xxxxxx
CQL documentation - 
http://docs.datastax.com/en/cql/3.0/cql/cql_reference/cqlsh.html

On Sun, Jul 19, 2015 at 2:00 PM, Chamila Wijayarathna 
<cdwijayarat...@gmail.com<mailto:cdwijayarat...@gmail.com>> wrote:
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<http://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<http://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/





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




--
Regards,
Umang Shah
+919886829019<tel:%2B919886829019>



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

Reply via email to