Riak Ruby client cannot connect to server

Cui Liqiang cui.liqiang at gmail.com
Tue Oct 14 09:50:06 EDT 2014


Hi, 

I just started to learn Riak, but encounter a problem.

I have installed Riak on my mac os using the official mac distribution.
After starting the Riak server, I can interact with it via http interface properly. 
Then I tried using Ruby client, and problem came. Below is the code I extract from Riak Ruby client github page:

> require 'riak'
> 
> client = Riak::Client.new(pb_port: 8098)
> bucket = client.bucket('rooms')
> 
> # Get an object from the bucket
> object = bucket.get_or_new("index.html")   # a Riak::RObject
> 
> # Change the object's data and save
> object.raw_data = "<html><body>Hello, world!</body></html>"
> object.content_type = "text/html"
> object.store
> 



When I run this program, it just hung there. After a little bit debugging, I found it hung in file lib/riak/client/beefcake/protocol.rb:44, which said:

> header = socket.read 5

My Ruby version is 2.1.1, Riak version is 2.0.1, Ruby client version is 2.1.0

Any ideas about this? 

-- 
Cui Liqiang

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.basho.com/pipermail/riak-users_lists.basho.com/attachments/20141014/51851029/attachment.html>


More information about the riak-users mailing list