Erlang PB Client Put Issue

Zheng Zhibin witeman.g at gmail.com
Mon Nov 14 11:39:31 EST 2011


Please try only start/2, not the start_link/2, since every error in shell will cause the process exit.

Best regards,
Zheng Zhibin

在 2011-11-15,上午12:10,Geeth Narayanan <gnarayan1 at gmail.com> 写道:

> Zheng,
> 
> Thanks for your reply. I tried the term_to_binary on It and still get the error below.
> Is there anyplace I can look to get more details on the exception.
> 
> 
> ** exception exit: {noproc,
>                        {gen_server,call,
>                            [<0.39.0>,
>                             {req,
>                                 {rpbputreq,<<"Items">>,<<"Item1">>,undefined,
>                                     {rpbcontent,
>                                         <<131,104,4,100,0,4,105,116,101,109,97,1,
>                                           107,...>>,
>                                         undefined,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
> 
> 
> 2011/11/12 Zheng Zhibin <witeman.g at gmail.com>
> Both the bucket name, key, and value should be binary format
> 
> Best regards,
> Zheng Zhibin
> 
> 在 2011-11-13,上午6:19,Geeth Narayanan <gnarayan1 at gmail.com> 写道:
> 
>> 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"}}
>> 
> Try term_to_binary(It)
> 
>> 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
>> _______________________________________________
>> riak-users mailing list
>> riak-users at lists.basho.com
>> http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com
> 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.basho.com/pipermail/riak-users_lists.basho.com/attachments/20111115/402bd5b1/attachment.html>


More information about the riak-users mailing list