Comments (11)
You should be using Cassandra gem 0.10.0
from cassandra.
I think this is fixed.
from cassandra.
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.
ok, i'll look into today
from cassandra.
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.
@dark-red-and-yellow as ryan mentioned. You need to require the 0.7 API if you are using cassandra 0.7
from cassandra.
@ryanking & @scrum8: Ah, you're right. Thanks for the clarification and sorry for the misunderstanding - I totally had missed that.
from cassandra.
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:in
open'
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:in
connect!'
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:in
describe_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:in
reconnect!'
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:in
keyspaces'
from (irb):43
from :0
from cassandra.
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:in
describe_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:in
handled_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:in
all_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:in
client'
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:in
column_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:in
column_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:in
insert'
from (irb):6
from cassandra.
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.
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)
- cassandra.insert can't handle UTF-8 characters HOT 7
- Best practice for determining the number of columns for a given row key? HOT 6
- Support for cassandra 2.0 HOT 9
- Twitter Cassandra Thrift Client Failover HOT 5
- cassandra.insert cannot handle booleans HOT 1
- CQLSH Version Issue HOT 1
- client.get :start :finish options don't get implemented HOT 2
- multi_get returns another hash in addition to the hash of key=>value pairs HOT 1
- get_range applies different order than used to add key-value pairs. HOT 7
- partitioner for range queries HOT 6
- Bug: rename_column_family does not rename HOT 2
- Feature: Logging HOT 1
- CQL 3 Support ? HOT 1
- Allow dropping of keyspaces HOT 1
- CassandraThrift::InvalidRequestException HOT 1
- Improve Docs HOT 2
- Cassandra#cluster appears to leak threads on failure to connect HOT 2
- Cassandra-rb and Ruby-driver gems conflict HOT 6
- cassandra-rb peformance issues with C* 2.1 HOT 2
- Hey
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cassandra.