Reg: Riak creatig object

Russell Brown russell.brown at me.com
Sat Jan 31 06:30:01 EST 2015


Hi,

1. That Value (Val1) needs to be a binary.
2. Since you started the rick_pb_socket, it crashed, so there is no longer a process, you need to f(Pid), {ok, Pid} = riakc_pb_socket:start_link("127.0.0.1", 8087).  again

Hope that helps

Russell

> On 31 Jan 2015, at 11:07, Babu Sunil <ssb491989 at gmail.com> wrote:
> 
> Hi,
> 
> I hope everything is going fine.
> 
> I have installed erlang and Riak on my machine.
> 
> I have created 5 nodes in Riak.
> {ok, Pid} = riakc_pb_socket:start("127.0.0.1", 8087
> ).
> 
> 
> 
> My Problem
> 1. 
> 
> 4> {ok, Pid} = riakc_pb_socket:start_link("127.0.0.1", 8087). 
> {ok,<0.44.0>}
> 5> MyBucket = <<"test">>.
> <<"test">>
> 6> Val1 = 1.
> 1
> 7> Obj1 = riakc_obj:new(MyBucket, <<"one">>, Val1).
> {riakc_obj,<<"test">>,<<"one">>,undefined,[],undefined,1}
> 8> riakc_pb_socket:put(Pid, Obj1).
> ** exception error: undefined function riak_pb_kv_codec:encode_content/1
>      in function  riakc_pb_socket:put/4 (src/riakc_pb_socket.erl, line 329)
> 
> 
> 2. 
> 
> 9> riakc_pb_socket:ping(Pid).
> ** exception exit: {noproc,
>                        {gen_server,call,
>                            [<0.44.0>,{req,rpbpingreq,60000},infinity]}}
>      in function  gen_server:call/3 (gen_server.erl, line 188)
> 10> 
> 
> Please help me solving this issue
> 
> Thanks & Regards,
> Sunil Babu S
> _______________________________________________
> riak-users mailing list
> riak-users at lists.basho.com
> http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com





More information about the riak-users mailing list