Ruby client not working when a node is down

Johan Harjono johanharjono at gmail.com
Fri May 28 14:19:36 EDT 2010


Hello,

I managed to set up a riak cluster running on 7 different machines.
Everything is working perfectly when all 7 nodes are running. However, when
I stopped one of the nodes, the ruby client library
http://github.com/seancribbs/ripple no longer work properly.

-bash-3.2# irb
irb(main):001:0> require 'rubygems'
=> true
irb(main):002:0> require 'riak'
=> true
irb(main):003:0> client = Riak::Client.new({:host => '10.10.1.36'})
curb library not found! Please `gem install curb` for better performance.
=> #<Riak::Client http://10.10.1.36:8098>
irb(main):004:0> b = client.bucket('users')
/usr/lib/ruby/1.8/timeout.rb:54:in `rbuf_fill': execution expired
(Timeout::Error)
from /usr/lib/ruby/1.8/timeout.rb:56:in `timeout'
from /usr/lib/ruby/1.8/timeout.rb:76:in `timeout'
from /usr/lib/ruby/1.8/net/protocol.rb:132:in `rbuf_fill'
from /usr/lib/ruby/1.8/net/protocol.rb:116:in `readuntil'
from /usr/lib/ruby/1.8/net/protocol.rb:126:in `readline'
from /usr/lib/ruby/1.8/net/http.rb:2020:in `read_status_line'
from /usr/lib/ruby/1.8/net/http.rb:2009:in `read_new'
from /usr/lib/ruby/1.8/net/http.rb:1050:in `request'
from
/usr/lib/ruby/gems/1.8/gems/riak-client-0.7.0/lib/riak/client/net_http_backend.rb:33:in
`perform'
from /usr/lib/ruby/1.8/net/http.rb:543:in `start'
from /usr/lib/ruby/1.8/net/http.rb:440:in `start'
from
/usr/lib/ruby/gems/1.8/gems/riak-client-0.7.0/lib/riak/client/net_http_backend.rb:25:in
`perform'
from
/usr/lib/ruby/gems/1.8/gems/riak-client-0.7.0/lib/riak/client/http_backend.rb:71:in
`get'
from /usr/lib/ruby/gems/1.8/gems/riak-client-0.7.0/lib/riak/client.rb:120:in
`bucket'
from (irb):4:in `irb_binding'
from /usr/lib/ruby/1.8/irb/workspace.rb:52:in `irb_binding'
from /usr/lib/ruby/1.8/irb/workspace.rb:52

Using curl to send HTTP request manually works perfectly even when nodes are
down. It's only using the riak-client for ruby that is problematic. Bringing
the fallen node back up solved the problem for ruby (but of course the whole
point is that riak should be available even when some nodes are down). Has
anyone ever encountered this problem before?

thanks,
Johan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.basho.com/pipermail/riak-users_lists.basho.com/attachments/20100528/4b5331e0/attachment.html>


More information about the riak-users mailing list