incubator-cassandra-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Aaron Morton <aa...@thelastpickle.com>
Subject Re: Newbie question about connecting to a cassandra server from another server using Fauna
Date Mon, 06 Dec 2010 20:15:21 GMT
You can run the cassandra-cli from any machine. If you run it from the same machine as your
ruby code it's a reliable way to check you can connect to the cluster. 

ok, next set of questions....

- what version of cassandra are you using ? Is it 0.7?
- what require did you run ? was it require 'cassandra/0.7' ? see the Usage section https://github.com/fauna/cassandra for
details. 

  Cassandra 0.7 defaults to frames transport, 0.6 does not. 

Aaron

On 07 Dec, 2010,at 09:07 AM, Alberto Velandia <betovelandia@gmail.com> wrote:

I've tried the keyspaces() function and got this on return:

 compass.keyspaces()
CassandraThrift::Cassandra::Client::TransportException: CassandraThrift::Cassandra::Client::TransportException
	from /home/compass/.rvm/gems/ruby-1.92-p0@rails3/gems/thrift-0.2.0.4/lib/thrift/transport/socket.rb:53:in
`rescue in open'
	from /home/compass/.rvm/gems/ruby-1.9.2-p0@rails3/gems/thrift-0.2.0.4/lib/thrift/transport/socket.rb:36:in
`open'
	from /home/compass/.rvm/gems/ruby-1.9.2-p0@rails3/gems/thrift-0.2.0.4/lib/thrift/transport/buffered_transport.rb:37:in
`open'
	from /home/compass/.rvm/gems/ruby-1.9.2-p0@rails3/gems/thrift_client-0.5.0/lib/thrift_client/connection/socket.rb:11:in
`connect!'
	from /home/compass/.rvm/gems/ruby-1.9.2-p0@rails3/gems/thrift_client-0.5.0/lib/thrift_client/abstract_thrift_client.rb:82:in
`connect!'
	from /home/compass/.rvm/gems/ruby-1.9.2-p0@rails3/gems/thrift_client-0.5.0/lib/thrift_client/abstract_thrift_client.rb:110:in
`handled_proxy'
	from /home/compass/.rvm/gems/ruby-1.9.2-p0@rails3/gems/thrift_client-0.5.0/lib/thrift_client/abstract_thrift_client.rb:57:in
`get_string_property'
	from /home/compass/.rvm/gems/ruby-1.9.2-p0@rails3/gems/cassandra-0.8.2/lib/cassandra/cassandra.rb:302:in
`all_nodes'
	from /home/compass/.rvm/gems/ruby-1.9.2-p0@rails3/gems/cassandra-0.8.2/lib/cassandra/cassandra.rb:285:in
`reconnect!'
	from /home/compass/.rvm/gems/ruby-1.9.2-p0@rails3/gems/cassandra-0.8.2/lib/cassandra/cassandra.rb:280:in
`client'
	from /home/compass/.rvm/gems/ruby-1.9.2-p0@rails3/gems/cassandra-0.8.2/lib/cassandra/cassandra.rb:86:in
`keyspaces'
	from (irb):4
	from /home/compass/.rvm/rubies/ruby-1.9.2-p0/bin/irb:16:in `<main>'


about the cassandra-cli, should I run the command on the server from which I'm trying to connect?

Thanks for the help
On Dec 6, 2010, at 2:52 PM, Aaron Morton wrote:

What function are you calling to get data and what is the error ?

Try calling a function like keyspaces(), it should return a list of the keyspaces in your
cluster  and is a good way to test things are connected.

If there is still no joy check you can connect to your cluster using the cassandra-cli command
line app located in cassandra/bin

Aaron

On 07 Dec, 2010,at 08:46 AM, Alberto Velandia <betovelandia@gmail.com> wrote:

Hi I'm trying to create a connection to a server running cassandra doing this:

compass = Cassandra.new('Compas', servers="223.798.456.123:9160")

But once I try to get some data I realize that there's no connection, any ideas?? I'm I missing
something ?

Thanks



Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
    • Unnamed multipart/related (inline, None, 0 bytes)
View raw message