Erlang PB Client Put Issue

Geeth Narayanan gnarayan1 at gmail.com
Sat Nov 12 17:19:30 EST 2011


Hi,

I am trying to put some erlang record item to my dev riak nodes. I get the
following error at the bottom. Can you please help?

1> code:which(riakc_pb_socket).
"/Users/geeth/Apps/riak-erlang-client/ebin/riakc_pb_socket.beam"

2> {ok, Pid} = riakc_pb_socket:start_link("127.0.0.1", 8081).
{ok,<0.34.0>}

3> rd(item, {id, name, desc}).
item

4>
4> It = #item{id=1, name="Item1", desc="Some desc"}.
#item{id = 1,name = "Item1",desc = "Some desc"}

5> MyRec = riakc_obj:new(<<"Items">>, list_to_binary(integer_to_list(It#
item.id)), It).
{riakc_obj,<<"Items">>,<<"1">>,undefined,[],undefined,
           #item{id = 1,name = "Item1",desc = "Some desc"}}

6> Rec = riakc_pb_socket:put(Pid, MyRec).
** exception exit: {noproc,
                    {gen_server,call,
                     [<0.34.0>,
                      {req,
                       {rpbputreq,<<"Items">>,<<"1">>,undefined,
                        {rpbcontent,
                         <<131,104,4,100,0,4,105,116,101,109,97,1,107,...>>,
                         "application/x-erlang-binary",undefined,undefined,
                         undefined,undefined,undefined,undefined,undefined,
                         undefined},
                        undefined,undefined,undefined,undefined,undefined,
                        undefined,undefined},
                       60000},
                      infinity]}}
     in function  gen_server:call/3


Thanks.
Geeth
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.basho.com/pipermail/riak-users_lists.basho.com/attachments/20111112/e912cf1c/attachment.html>


More information about the riak-users mailing list