You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@cassandra.apache.org by Mahmood Naderan <nt...@yahoo.com> on 2015/05/26 11:38:15 UTC

connection refused error for cassandra-cli

Hello,I have downloaded cassandra-1.2.0 for a test. The output of ./bin/cassandra and ./bin/cassandra-cli seems to be fine. Please see http://pastebin.com/Tgs7qyjS
Next, I created a setup-ycsb.cql and wrote[mahmood@tiger ycsb-0.1.4]$ cat setup-ycsb.cql
CREATE KEYSPACE usertable
with placement_strategy = 'org.apache.cassandra.locator.SimpleStrategy'
and strategy_options = {replication_factor:2};
use usertable;
create column family data with comparator=UTF8Type and default_validation_class=UTF8Type and key_validation_class=UTF8Type;
  

Problem is, when I execute cassandra-cli commnad, I get connection refused error
[mahmood@tiger ycsb-0.1.4]$ cassandra-cli -h 192.168.1.5 -f setup-ycsb.cql
org.apache.thrift.transport.TTransportException: java.net.ConnectException: Connection refused




Everything seems to be normal as I disabled the firewall. So I wonder why I receive that error. 
Please see this output for more detail  http://pastebin.com/Bnd3TNCM
  

Did I miss anything?
 Regards,
Mahmood

Re: connection refused error for cassandra-cli

Posted by Mark Reddy <ma...@gmail.com>.
By default the cli will connect to localhost so you don't even need to
specify a host (-h). You should only need to specify a host if connecting
to a remote host or locally on a different ip than localhost (127.0.0.1).


Mark

On 26 May 2015 at 15:37, Mahmood Naderan <nt...@yahoo.com> wrote:

> Thanks. Instead of changing cassandra.yaml parameters, I found that the
> default is "localhost". So I ran "cassandra-cli -h localhost ...."
>
> I will try the latest version. Thanks a lot.
>
> Regards,
> Mahmood
>
>
>
>

Re: connection refused error for cassandra-cli

Posted by Mahmood Naderan <nt...@yahoo.com>.
Thanks. Instead of changing cassandra.yaml parameters, I found that the default is "localhost". So I ran "cassandra-cli -h localhost ...."
I will try the latest version. Thanks a lot.
 Regards,
Mahmood


  

Re: connection refused error for cassandra-cli

Posted by Mark Reddy <ma...@gmail.com>.
Have you configured the rpc_address to listen on that ip? You can check
your nodes casandra.yaml for the rpc_address setting.

On a side node why are you testing on such an old version of Cassandra? The
latest versions of 1.2.x is 1.2.19. There are also two branches of 2.x
which are 2.0.15 and 2.1.5.


Mark

On 26 May 2015 at 10:38, Mahmood Naderan <nt...@yahoo.com> wrote:

> Hello,
> I have downloaded cassandra-1.2.0 for a test. The output of
> ./bin/cassandra and ./bin/cassandra-cli seems to be fine. Please see
> http://pastebin.com/Tgs7qyjS
>
> Next, I created a setup-ycsb.cql and wrote
> [mahmood@tiger ycsb-0.1.4]$ cat setup-ycsb.cql
> CREATE KEYSPACE usertable
> with placement_strategy = 'org.apache.cassandra.locator.SimpleStrategy'
> and strategy_options = {replication_factor:2};
> use usertable;
> create column family data with comparator=UTF8Type and
> default_validation_class=UTF8Type and key_validation_class=UTF8Type;
>
>
> Problem is, when I execute cassandra-cli commnad, I get connection refused
> error
>
> [mahmood@tiger ycsb-0.1.4]$ cassandra-cli -h 192.168.1.5 -f setup-ycsb.cql
> org.apache.thrift.transport.TTransportException:
> java.net.ConnectException: Connection refused
>
>
>
>
> Everything seems to be normal as I disabled the firewall. So I wonder why
> I receive that error.
> Please see this output for more detail  http://pastebin.com/Bnd3TNCM
>
>
> Did I miss anything?
>
> Regards,
> Mahmood
>