Erlang PBC won't generate key

Gabriel Pickard gpickard at
Fri Jul 22 11:36:47 EDT 2011


I would like to let Riak generate a key for a posted item, using the Erlang
PBC. I tried to do it according to the client library readme, by replacing
the key by the atom undefined as second argument to  riakc_obj:new. Results
as shown at bottom of email.
It works using the PBC if I specify a key, I can also have Riak generate a
key using the HTTP interface, it's only generating a key from PBC that
doesn't seem to work for me.
Anyone can reproduce this?

Another thing that I noticed: There's a slight inconsistency in the
documentation that tripped me up a few times; uses port 8091 for all
its examples, whereas as
well as my version use port 8098 for HTTP communication.
Also, being a newbie, I confused the protobuf and HTTP port a few times,
really not sure but maybe a small reminder in the PBC readme would help with

Thank you guys at Basho for Riak, it's a joy to work with.

Cheers, Gabe

1> {ok, Pid} = riakc_pb_socket:start_link("", 8087).
2> Object = riakc_obj:new(<<"groceries">>, undefined, <<"eggs & bacon">>).
           <<"eggs & bacon">>}
3> riakc_pb_socket:put(Pid, Object).

=ERROR REPORT==== 22-Jul-2011::17:16:38 ===
** Generic server <0.35.0> terminating
** Last message in was {tcp_closed,#Port<0.899>}
** When Server state == {state,"",8087,false,false,undefined,
** Reason for termination ==
** disconnected
** exception exit: disconnected
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the riak-users mailing list