Riak Ruby client cannot connect to server

Sean Cribbs sean at basho.com
Tue Oct 14 09:57:37 EDT 2014


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> 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
> http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com
>



-- 
Sean Cribbs <sean at basho.com>
Sr. Software Engineer
Basho Technologies, Inc.
http://basho.com/




More information about the riak-users mailing list