cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rushan Shaymardanov (JIRA)" <j...@apache.org>
Subject [jira] [Created] (CASSANDRA-6303) cassandra-cli should exit with error-exit status when it can't connect to cluster
Date Wed, 06 Nov 2013 09:35:18 GMT
Rushan Shaymardanov created CASSANDRA-6303:
----------------------------------------------

             Summary: cassandra-cli should exit with error-exit status when it can't connect
to cluster
                 Key: CASSANDRA-6303
                 URL: https://issues.apache.org/jira/browse/CASSANDRA-6303
             Project: Cassandra
          Issue Type: Bug
          Components: Tools
            Reporter: Rushan Shaymardanov
            Priority: Minor


When casasndra-cli can't connect to cassandra, it returns success:

# echo "use my_keyspace;" | cassandra-cli -h myhost -f /dev/stdin 
org.apache.thrift.transport.TTransportException: java.net.ConnectException: Connection refused
        at org.apache.thrift.transport.TSocket.open(TSocket.java:183)
        at org.apache.thrift.transport.TFramedTransport.open(TFramedTransport.java:81)
        at org.apache.cassandra.cli.CliMain.connect(CliMain.java:70)
        at org.apache.cassandra.cli.CliMain.main(CliMain.java:246)
Caused by: java.net.ConnectException: Connection refused
        at java.net.PlainSocketImpl.socketConnect(Native Method)
        at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:339)
        at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:200)
        at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:182)
        at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
        at java.net.Socket.connect(Socket.java:579)
        at org.apache.thrift.transport.TSocket.open(TSocket.java:178)
        ... 3 more
Exception connecting to boney/9160. Reason: Connection refused.
Not connected to a cassandra instance.
[root@boney ~]# echo $?
0




--
This message was sent by Atlassian JIRA
(v6.1#6144)

Mime
View raw message