Riak Ruby client cannot connect to server
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:
> 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
> 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"
> 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
> Any ideas about this?
> Cui Liqiang
> riak-users mailing list
> riak-users at lists.basho.com
Sean Cribbs <sean at basho.com>
Sr. Software Engineer
Basho Technologies, Inc.
More information about the riak-users