Riak Ruby client cannot connect to server

Cui Liqiang cui.liqiang at gmail.com
Wed Oct 15 07:42:56 EDT 2014


That’s very helpful.  Thanks a lot!  

--  
Cui Liqiang


On Tuesday, October 14, 2014 at 9:57 PM, Sean Cribbs wrote:

> You are connecting the binary client to the HTTP port. Use port 8087 instead.
>  
> On Tue, Oct 14, 2014 at 8:50 AM, Cui Liqiang <cui.liqiang at gmail.com (mailto:cui.liqiang at gmail.com)> wrote:
> > 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
> >  
> > _______________________________________________
> > riak-users mailing list
> > riak-users at lists.basho.com (mailto:riak-users at lists.basho.com)
> > http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com
> >  
>  
>  
>  
>  
> --  
> Sean Cribbs <sean at basho.com (mailto:sean at basho.com)>
> Sr. Software Engineer
> Basho Technologies, Inc.
> http://basho.com/
>  
>  


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


More information about the riak-users mailing list