You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@cassandra.apache.org by Joshua Partogi <jo...@gmail.com> on 2010/12/01 12:29:29 UTC

Can not connect to cassandra 0.7 using CLI

Hi there,

I just downloaded cassandra 0.7rc1. I started it using bin/cassandra without
making any configuration changes.

I then tried to connect using the CLI with command like this:

foo@ubuntu:~/Applications/apache-cassandra-0.7.0-rc1$ bin/cassandra-cli
Welcome to cassandra CLI.

Type 'help' or '?' for help. Type 'quit' or 'exit' to quit.
[default@unknown] connect localhost/9160;
Exception connecting to localhost/9160. Reason: Connection refused.

Why am I getting connection refused? I didn't experience this with cassandra
0.6.8.

Thank you in advance for your help.

Kind regards,
Joshua.

-- 
http://twitter.com/jpartogi <http://twitter.com/scrum8>

Re: Can not connect to cassandra 0.7 using CLI

Posted by Jake Luciani <ja...@gmail.com>.
http://screenr.com/5G6

On Wed, Sep 28, 2011 at 11:56 AM, Julio Julio
<ju...@poczta.onet.pl>wrote:

> thanks a lot for help! I don't know what exactly was wrong (because I
> deleted
> everything including java and started from the very beginning) but now
> everything seems to work perfectly and I'm doing first stepes with
> Cassandra.
>
> By the way...
> Maybe do you have some useful advices (or you know some articles) about
> making
> working the "ring". I want to make databases under control of Cassandra
> which
> will consist of a few computers working together. (?)
>
> thanks for help
> best regards
>
>
>
>


-- 
http://twitter.com/tjake

Re: Can not connect to cassandra 0.7 using CLI

Posted by Julio Julio <ju...@poczta.onet.pl>.
thanks a lot for help! I don't know what exactly was wrong (because I deleted
everything including java and started from the very beginning) but now
everything seems to work perfectly and I'm doing first stepes with Cassandra.

By the way... 
Maybe do you have some useful advices (or you know some articles) about making
working the "ring". I want to make databases under control of Cassandra which
will consist of a few computers working together. (?)

thanks for help
best regards 




Re: Can not connect to cassandra 0.7 using CLI

Posted by aaron morton <aa...@thelastpickle.com>.
Make sure that the directory /var/log/cassandra exists and the user running cassandra has permission to use it. 

There are some instructions here in the readme file 
https://github.com/apache/cassandra/blob/cassandra-0.7.9/README.txt#L27

Good luck. 

A

-----------------
Aaron Morton
Freelance Cassandra Developer
@aaronmorton
http://www.thelastpickle.com

On 24/09/2011, at 10:01 PM, Julio Julio wrote:

> Eric Evans <eevans <at> rackspace.com> writes:
> 
>> 
>> On Thu, 2010-12-02 at 08:11 +1100, Joshua Partogi wrote:
>>> It is set to localhost I didn't change it and it is the same as
>>> configured
>>> in 0.6.8. Why doesn't it work out of the box?
>>> 
>>> Thanks heaps. 
>> 
>> Try "netstat -nl | grep 9160".  Is the node listening on 9160?  Which
>> interface is it bound to?
>> 
> 
> 
> I've got the same problem :( I've tried "netstat -nl | grep 9160" 
> and received nothing on the console output. In my cassandra.yaml
> file I've got:
> listen_address: localhost
> rpc_address: localhost
> rpc_port: 9160
> rpc_keepalive: true
> 
> (it might be a clue what is wrong) when I type "cassandra" on 
> the terminal I get this:
> 
> julio@julio-System-Product-Name:~$ log4j:ERROR setFile
> (null,true) 
> call failed.
> java.io.FileNotFoundException: /var/log/cassandra/system.log 
> (Permission denied)
> 	at java.io.FileOutputStream.openAppend(Native Method)
> 	at java.io.FileOutputStream.<init>
> (FileOutputStream.java:207)
> 
> and more ... ;/
> 
> what should I do? maybe I make silly mistakes but I'm completely 
> new to noSQL and Cassandra. Please, help me!
> 
> best regards
> Julio
> 
> 


Re: Can not connect to cassandra 0.7 using CLI

Posted by Julio Julio <ju...@poczta.onet.pl>.
Eric Evans <eevans <at> rackspace.com> writes:

> 
> On Thu, 2010-12-02 at 08:11 +1100, Joshua Partogi wrote:
> > It is set to localhost I didn't change it and it is the same as
> > configured
> > in 0.6.8. Why doesn't it work out of the box?
> > 
> > Thanks heaps. 
> 
> Try "netstat -nl | grep 9160".  Is the node listening on 9160?  Which
> interface is it bound to?
> 


I've got the same problem :( I've tried "netstat -nl | grep 9160" 
and received nothing on the console output. In my cassandra.yaml
file I've got:
listen_address: localhost
rpc_address: localhost
rpc_port: 9160
rpc_keepalive: true

(it might be a clue what is wrong) when I type "cassandra" on 
the terminal I get this:

julio@julio-System-Product-Name:~$ log4j:ERROR setFile
(null,true) 
call failed.
java.io.FileNotFoundException: /var/log/cassandra/system.log 
(Permission denied)
	at java.io.FileOutputStream.openAppend(Native Method)
	at java.io.FileOutputStream.<init>
(FileOutputStream.java:207)

and more ... ;/

what should I do? maybe I make silly mistakes but I'm completely 
new to noSQL and Cassandra. Please, help me!

best regards
Julio



Re: Can not connect to cassandra 0.7 using CLI

Posted by Joshua Partogi <jp...@scrum8.com>.
Hi Eric,

Thanks for the hint. I have found out that if there is an exception thrown,
the thrift server won't be started. It is working fine now.

Kind regards,
joshua.

On Fri, Dec 3, 2010 at 10:52 AM, Eric Evans <ee...@rackspace.com> wrote:

> On Thu, 2010-12-02 at 08:11 +1100, Joshua Partogi wrote:
> > It is set to localhost I didn't change it and it is the same as
> > configured
> > in 0.6.8. Why doesn't it work out of the box?
> >
> > Thanks heaps.
>
> Try "netstat -nl | grep 9160".  Is the node listening on 9160?  Which
> interface is it bound to?
>
> --
> Eric Evans
> eevans@rackspace.com
>
>


-- 
http://twitter.com/jpartogi

Re: Can not connect to cassandra 0.7 using CLI

Posted by Eric Evans <ee...@rackspace.com>.
On Thu, 2010-12-02 at 08:11 +1100, Joshua Partogi wrote:
> It is set to localhost I didn't change it and it is the same as
> configured
> in 0.6.8. Why doesn't it work out of the box?
> 
> Thanks heaps. 

Try "netstat -nl | grep 9160".  Is the node listening on 9160?  Which
interface is it bound to?

-- 
Eric Evans
eevans@rackspace.com


Re: Can not connect to cassandra 0.7 using CLI

Posted by Joshua Partogi <jp...@scrum8.com>.
It is set to localhost I didn't change it and it is the same as configured
in 0.6.8. Why doesn't it work out of the box?

Thanks heaps.

On Thu, Dec 2, 2010 at 7:49 AM, Aaron Morton <aa...@thelastpickle.com>wrote:

> Take a look at your cassandra.yaml file at the rpc_address this is the
> address it's listening to connections on. The comments there should help, if
> you set it to 0.0.0.0 it will bind to all interfaces.  Probably not what you
> want in production but handy for dev.
>
> Hope that helps.
> Aaron
>
> On 02 Dec, 2010,at 09:40 AM, Joshua Partogi <jp...@scrum8.com> wrote:
>
> Hi Brayton.
>
> Thanks for the reply. It was running find on 0.6.8 on the same box.
>
> Kind regards,
> Joshua
>
> On Thu, Dec 2, 2010 at 1:05 AM, Brayton Thompson <th...@grnoc.iu.edu>wrote:
>
>> All of the times I have had similar issues the problem has always been
>> misconfigured iptables. You said it was running fine on 0.6.8 though?
>> On the same box or a different box?
>>
>>
>> On Dec 1, 2010, at 6:29 AM, Joshua Partogi wrote:
>>
>> Hi there,
>>
>> I just downloaded cassandra 0.7rc1. I started it using bin/cassandra
>> without making any configuration changes.
>>
>> I then tried to connect using the CLI with command like this:
>>
>> foo@ubuntu:~/Applications/apache-cassandra-0.7.0-rc1$ bin/cassandra-cli
>> Welcome to cassandra CLI.
>>
>> Type 'help' or '?' for help. Type 'quit' or 'exit' to quit.
>> [default@unknown] connect localhost/9160;
>> Exception connecting to localhost/9160. Reason: Connection refused.
>>
>> Why am I getting connection refused? I didn't experience this with
>> cassandra 0.6.8.
>>
>> Thank you in advance for your help.
>>
>> Kind regards,
>> Joshua.
>>
>> --
>> http://twitter.com/jpartogi <http://twitter.com/scrum8>
>>
>>
>>
>
>
> --
> http://twitter.com/jpartogi
>
>


-- 
http://twitter.com/jpartogi

Re: Can not connect to cassandra 0.7 using CLI

Posted by Aaron Morton <aa...@thelastpickle.com>.
Take a look at your cassandra.yaml file at the rpc_address this is the address it's listening to connections on. The comments there should help, if you set it to 0.0.0.0 it will bind to all interfaces.  Probably not what you want in production but handy for dev.

Hope that helps. 
Aaron

On 02 Dec, 2010,at 09:40 AM, Joshua Partogi <jp...@scrum8.com> wrote:

Hi Brayton.

Thanks for the reply. It was running find on 06.8 on the same box.

Kind regards,
Joshua

On Thu, Dec 2, 2010 at 1:05 AM, Brayton Thompson <th...@grnoc.iu.edu> wrote:
All of the times I have had similar issues the problem has always been misconfigured iptables. You said it was running fine on 0.6.8 though?
On the same box or a different box?


On Dec 1, 2010, at 6:29 AM, Joshua Partogi wrote:

Hi there,

I just downloaded cassandra 0.7rc1. I started it using bin/cassandra without making any configuration changes.

I then tried to connect using the CLI with command like this:

foo@ubuntu:~/Applications/apache-cassandra-0.7.0-rc1$ bin/cassandra-cli
Welcome to cassandra CLI.

Type 'help' or '?' for help. Type 'quit' or 'exit' to quit
[default@unknown] connect localhost/9160;
Exception connecting to localhost/9160. Reason: Connection refused.

Why am I getting connection refused? I didn't experience this with cassandra 0.6.8.

Thank you in advance for your help.

Kind regards,
Joshua.

-- 
http://twitter.com/jpartogi




-- 
http://twitter.com/jpartogi

Re: Can not connect to cassandra 0.7 using CLI

Posted by Joshua Partogi <jp...@scrum8.com>.
Hi Brayton.

Thanks for the reply. It was running find on 0.6.8 on the same box.

Kind regards,
Joshua

On Thu, Dec 2, 2010 at 1:05 AM, Brayton Thompson <th...@grnoc.iu.edu>wrote:

> All of the times I have had similar issues the problem has always been
> misconfigured iptables. You said it was running fine on 0.6.8 though?
> On the same box or a different box?
>
> On Dec 1, 2010, at 6:29 AM, Joshua Partogi wrote:
>
> Hi there,
>
> I just downloaded cassandra 0.7rc1. I started it using bin/cassandra
> without making any configuration changes.
>
> I then tried to connect using the CLI with command like this:
>
> foo@ubuntu:~/Applications/apache-cassandra-0.7.0-rc1$ bin/cassandra-cli
> Welcome to cassandra CLI.
>
> Type 'help' or '?' for help. Type 'quit' or 'exit' to quit.
> [default@unknown] connect localhost/9160;
> Exception connecting to localhost/9160. Reason: Connection refused.
>
> Why am I getting connection refused? I didn't experience this with
> cassandra 0.6.8.
>
> Thank you in advance for your help.
>
> Kind regards,
> Joshua.
>
> --
> http://twitter.com/jpartogi <http://twitter.com/scrum8>
>
>
>


-- 
http://twitter.com/jpartogi

Re: Can not connect to cassandra 0.7 using CLI

Posted by Brayton Thompson <th...@grnoc.iu.edu>.
All of the times I have had similar issues the problem has always been misconfigured iptables. You said it was running fine on 0.6.8 though?
On the same box or a different box?

On Dec 1, 2010, at 6:29 AM, Joshua Partogi wrote:

> Hi there,
> 
> I just downloaded cassandra 0.7rc1. I started it using bin/cassandra without making any configuration changes.
> 
> I then tried to connect using the CLI with command like this:
> 
> foo@ubuntu:~/Applications/apache-cassandra-0.7.0-rc1$ bin/cassandra-cli
> Welcome to cassandra CLI.
> 
> Type 'help' or '?' for help. Type 'quit' or 'exit' to quit.
> [default@unknown] connect localhost/9160;
> Exception connecting to localhost/9160. Reason: Connection refused.
> 
> Why am I getting connection refused? I didn't experience this with cassandra 0.6.8.
> 
> Thank you in advance for your help.
> 
> Kind regards,
> Joshua.
> 
> -- 
> http://twitter.com/jpartogi


Re: Can not connect to cassandra 0.7 using CLI

Posted by Ying Tang <iv...@gmail.com>.
try
 bin/cassandra-cli --host <localhost's ip>

On Wed, Dec 1, 2010 at 7:29 PM, Joshua Partogi <jo...@gmail.com>wrote:

> Hi there,
>
> I just downloaded cassandra 0.7rc1. I started it using bin/cassandra
> without making any configuration changes.
>
> I then tried to connect using the CLI with command like this:
>
> foo@ubuntu:~/Applications/apache-cassandra-0.7.0-rc1$ bin/cassandra-cli
> Welcome to cassandra CLI.
>
> Type 'help' or '?' for help. Type 'quit' or 'exit' to quit.
> [default@unknown] connect localhost/9160;
> Exception connecting to localhost/9160. Reason: Connection refused.
>
> Why am I getting connection refused? I didn't experience this with
> cassandra 0.6.8.
>
> Thank you in advance for your help.
>
> Kind regards,
> Joshua.
>
> --
> http://twitter.com/jpartogi <http://twitter.com/scrum8>
>



-- 
Best regards,

Ivy Tang