Git Product home page Git Product logo

Comments (11)

jpartogi avatar jpartogi commented on August 21, 2024

You should be using Cassandra gem 0.10.0

from cassandra.

ryanking avatar ryanking commented on August 21, 2024

I think this is fixed.

from cassandra.

troessner avatar troessner commented on August 21, 2024

As far as I can see this is not fixed (@ srcurm8 not sure what you're referring to - the latest gem version is 0.9.0, right?)

Easily reproducible via:

sudo gem install cassandra -v '0.9.0'

cd /tmp && wget http://apache.watchdownload.com//cassandra/0.7.0/apache-cassandra-0.7.0-rc2-bin.tar.gz

tar xzf apache-cassandra-0.7.0-rc2-bin.tar.gz

cd apache-cassandra-0.7.0-rc2 && bin/cassandra -f

Now I get a similar albeit slightly different error:

require 'rubygems'

require 'cassandra'

client = Cassandra.new 'system', '127.0.0.1:9160'

client.keyspaces

gives me:

CassandraThrift::Cassandra::Client::TransportException:

CassandraThrift::Cassandra::Client::TransportException

from /var/lib/gems/1.8/gems/thrift-0.5.0/lib/thrift/transport/socket.rb:120:in read'

from /var/lib/gems/1.8/gems/thrift-0.5.0/lib/thrift/transport/buffered_transport.rb:50:in read'

from /var/lib/gems/1.8/gems/thrift-0.5.0/lib/thrift/transport/base_transport.rb:52:in read_all'

from /var/lib/gems/1.8/gems/thrift-0.5.0/lib/thrift/protocol/binary_protocol.rb:186:in read_i32'

from /var/lib/gems/1.8/gems/thrift-0.5.0/lib/thrift/protocol/binary_protocol.rb:111:in read_message_begin'

from /var/lib/gems/1.8/gems/thrift-0.5.0/lib/thrift/client.rb:45:in receive_message'

from /var/lib/gems/1.8/gems/cassandra-0.9.0/lib/../vendor/0.6/gen-rb/cassandra.rb:236:in recv_get_string_property'

from /var/lib/gems/1.8/gems/cassandra-0.9.0/lib/../vendor/0.6/gen-rb/cassandra.rb:228:in get_string_property'

from /var/lib/gems/1.8/gems/thrift_client-0.6.0/lib/thrift_client/abstract_thrift_client.rb:115:in send'

from /var/lib/gems/1.8/gems/thrift_client-0.6.0/lib/thrift_client/abstract_thrift_client.rb:115:in handled_proxy'
from /var/lib/gems/1.8/gems/thrift_client-0.6.0/lib/thrift_client/abstract_thrift_client.rb:57:in get_string_property'

from /var/lib/gems/1.8/gems/cassandra-0.9.0/lib/cassandra/0.6/cassandra.rb:55:in all_nodes'

from /var/lib/gems/1.8/gems/cassandra-0.9.0/lib/cassandra/0.6/cassandra.rb:42:in reconnect!'

from /var/lib/gems/1.8/gems/cassandra-0.9.0/lib/cassandra/0.6/cassandra.rb:37:in client'

from /var/lib/gems/1.8/gems/cassandra-0.9.0/lib/cassandra/cassandra.rb:92:in keyspaces'

I get the same results on other machines as well, so I can pretty much exclude that my local environment is borked and responsible for this behaviour.

from cassandra.

ryanking avatar ryanking commented on August 21, 2024

ok, i'll look into today

from cassandra.

ryanking avatar ryanking commented on August 21, 2024

Turns out this is not a bug, just a misunderstanding. To use this library with cassandra 0.7 you need to do this:

require 'cassandra/0.7'

see https://github.com/fauna/cassandra/blob/master/README.rdoc

from cassandra.

jpartogi avatar jpartogi commented on August 21, 2024

@dark-red-and-yellow as ryan mentioned. You need to require the 0.7 API if you are using cassandra 0.7

from cassandra.

troessner avatar troessner commented on August 21, 2024

@ryanking & @scrum8: Ah, you're right. Thanks for the clarification and sorry for the misunderstanding - I totally had missed that.

from cassandra.

etamme avatar etamme commented on August 21, 2024

I am using ree 1.8.7 and 0.9.0 cassandra gem with cassandra 0.7. I get the same error even when I specify require 'cassandra/0.7'

irb(main):043:0> client.keyspaces
CassandraThrift::Cassandra::Client::TransportException: CassandraThrift::Cassandra::Client::TransportException
from /opt/ree/lib/ruby/gems/1.8/gems/thrift-0.5.0/lib/thrift/transport/socket.rb:53:in open' from /opt/ree/lib/ruby/gems/1.8/gems/thrift-0.5.0/lib/thrift/transport/framed_transport.rb:37:inopen'
from /opt/ree/lib/ruby/gems/1.8/gems/thrift_client-0.6.0/lib/thrift_client/connection/socket.rb:11:in connect!' from /opt/ree/lib/ruby/gems/1.8/gems/thrift_client-0.6.0/lib/thrift_client/abstract_thrift_client.rb:82:inconnect!'
from /opt/ree/lib/ruby/gems/1.8/gems/thrift_client-0.6.0/lib/thrift_client/abstract_thrift_client.rb:110:in handled_proxy' from /opt/ree/lib/ruby/gems/1.8/gems/thrift_client-0.6.0/lib/thrift_client/abstract_thrift_client.rb:57:indescribe_ring'
from /opt/ree/lib/ruby/gems/1.8/gems/cassandra-0.9.0/lib/cassandra/0.7/cassandra.rb:187:in all_nodes' from /opt/ree/lib/ruby/gems/1.8/gems/cassandra-0.9.0/lib/cassandra/0.7/cassandra.rb:175:inreconnect!'
from /opt/ree/lib/ruby/gems/1.8/gems/cassandra-0.9.0/lib/cassandra/0.7/cassandra.rb:168:in client' from /opt/ree/lib/ruby/gems/1.8/gems/cassandra-0.9.0/lib/cassandra/0.7/cassandra.rb:24:inkeyspaces'
from (irb):43
from :0

from cassandra.

stonegao avatar stonegao commented on August 21, 2024

Similar errors for me :

ree-1.8.7-2010.02 :006 > twitter.insert(:Users, '5', user)
CassandraThrift::InvalidRequestException: CassandraThrift::InvalidRequestException
from /Users/stone/.rvm/gems/ree-1.8.7-2010.02/gems/cassandra-0.9.0/lib/../vendor/0.7/gen-rb/cassandra.rb:314:in recv_describe_ring' from /Users/stone/.rvm/gems/ree-1.8.7-2010.02/gems/cassandra-0.9.0/lib/../vendor/0.7/gen-rb/cassandra.rb:304:indescribe_ring'
from /Users/stone/.rvm/gems/ree-1.8.7-2010.02/gems/thrift_client-0.6.0/lib/thrift_client/abstract_thrift_client.rb:115:in send' from /Users/stone/.rvm/gems/ree-1.8.7-2010.02/gems/thrift_client-0.6.0/lib/thrift_client/abstract_thrift_client.rb:115:inhandled_proxy'
from /Users/stone/.rvm/gems/ree-1.8.7-2010.02/gems/thrift_client-0.6.0/lib/thrift_client/abstract_thrift_client.rb:57:in describe_ring' from /Users/stone/.rvm/gems/ree-1.8.7-2010.02/gems/cassandra-0.9.0/lib/cassandra/0.7/cassandra.rb:187:inall_nodes'
from /Users/stone/.rvm/gems/ree-1.8.7-2010.02/gems/cassandra-0.9.0/lib/cassandra/0.7/cassandra.rb:175:in reconnect!' from /Users/stone/.rvm/gems/ree-1.8.7-2010.02/gems/cassandra-0.9.0/lib/cassandra/0.7/cassandra.rb:168:inclient'
from /Users/stone/.rvm/gems/ree-1.8.7-2010.02/gems/cassandra-0.9.0/lib/cassandra/0.7/cassandra.rb:31:in schema' from /Users/stone/.rvm/gems/ree-1.8.7-2010.02/gems/cassandra-0.9.0/lib/cassandra/0.7/columns.rb:19:incolumn_family_property'
from /Users/stone/.rvm/gems/ree-1.8.7-2010.02/gems/cassandra-0.9.0/lib/cassandra/columns.rb:20:in column_name_class_for_key' from /Users/stone/.rvm/gems/ree-1.8.7-2010.02/gems/cassandra-0.9.0/lib/cassandra/0.7/columns.rb:11:incolumn_name_class'
from /Users/stone/.rvm/gems/ree-1.8.7-2010.02/gems/cassandra-0.9.0/lib/cassandra/helpers.rb:20:in extract_and_validate_params' from /Users/stone/.rvm/gems/ree-1.8.7-2010.02/gems/cassandra-0.9.0/lib/cassandra/cassandra.rb:113:ininsert'
from (irb):6

from cassandra.

ralfr avatar ralfr commented on August 21, 2024

Same here. We are likely all coming from this excellent blog article, which needs to be updated someday (http://blog.evanweaver.com/2009/07/06/up-and-running-with-cassandra/). However, inserting yields the exact same error on my side. Any hints?

from cassandra.

travisbell avatar travisbell commented on August 21, 2024

Yup, I'm seeing this too even when I make sure to require cassandra/0.7.

I installed Cassandra via brew which is at version 0.7.3.

from cassandra.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.