<div dir="ltr"><div><div>Hi Luke,<br><br></div>Please find output of 'riak-debug' in attachment.<br><br></div>Regards,<br>Ayush<br></div><div class="gmail_extra"><br><div class="gmail_quote">On Sat, Oct 11, 2014 at 8:48 PM, Luke Bakken <span dir="ltr"><<a href="mailto:lbakken@basho.com" target="_blank">lbakken@basho.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi Ayush,<br>
<br>
Please email me the output of "riak-debug" from this node.<br>
<span class="im HOEnZb">--<br>
Luke Bakken<br>
Engineer / CSE<br>
<a href="mailto:lbakken@basho.com">lbakken@basho.com</a><br>
<br>
<br>
</span><div class="HOEnZb"><div class="h5">On Fri, Oct 10, 2014 at 9:46 PM, ayush mishra <<a href="mailto:ayushmishra2005@gmail.com">ayushmishra2005@gmail.com</a>> wrote:<br>
> This is related to precommit hook.<br>
><br>
><br>
> When I hit below command for both buckets abc-client and abc-client1:-<br>
><br>
> curl  <a href="http://127.0.0.1:8098/riak/abc-client" target="_blank">http://127.0.0.1:8098/riak/abc-client</a><br>
><br>
> {"props":{"allow_mult":false,"basic_quorum":false,"big_vclock":50,"chash_keyfun":{"mod":"riak_core_util","fun":"chash_std_keyfun"},"dvv_enabled":false,"dw":"quorum","last_write_wins":false,"linkfun":{"mod":"riak_kv_wm_link_walker","fun":"mapreduce_linkfun"},"n_val":3,"name":"abc-client","notfound_ok":true,"old_vclock":86400,"postcommit":[],"pr":0,"precommit":[{"mod":"riak_search_kv_hook","fun":"precommit"}],"pw":0,"r":"quorum","rw":"quorum","search":true,"small_vclock":50,"w":"quorum","young_vclock":20}}<br>
><br>
> curl  <a href="http://127.0.0.1:8098/riak/abc-client1" target="_blank">http://127.0.0.1:8098/riak/abc-client1</a><br>
><br>
> {"props":{"allow_mult":false,"basic_quorum":false,"big_vclock":50,"chash_keyfun":{"mod":"riak_core_util","fun":"chash_std_keyfun"},"dvv_enabled":false,"dw":"quorum","last_write_wins":false,"linkfun":{"mod":"riak_kv_wm_link_walker","fun":"mapreduce_linkfun"},"n_val":3,"name":"abc-client1","notfound_ok":true,"old_vclock":86400,"postcommit":[],"pr":0,"precommit":[],"pw":0,"r":"quorum","rw":"quorum","search":false,"small_vclock":50,"w":"quorum","young_vclock":20}}<br>
><br>
> I tried to remove precommit hook by below command:-<br>
><br>
> curl <a href="http://127.0.0.1:8098/riak/abc-client" target="_blank">http://127.0.0.1:8098/riak/abc-client</a> -X PUT -H "Content-Type:<br>
> application/json" -d '{"props":{"precommit":[]}}'<br>
><br>
><br>
> curl  <a href="http://127.0.0.1:8098/riak/abc-client" target="_blank">http://127.0.0.1:8098/riak/abc-client</a><br>
><br>
><br>
> {"props":{"allow_mult":false,"basic_quorum":false,"big_vclock":50,"chash_keyfun":{"mod":"riak_core_util","fun":"chash_std_keyfun"},"dvv_enabled":false,"dw":"quorum","last_write_wins":false,"linkfun":{"mod":"riak_kv_wm_link_walker","fun":"mapreduce_linkfun"},"n_val":3,"name":"abc-client","notfound_ok":true,"old_vclock":86400,"postcommit":[],"pr":0,"precommit":[],"pw":0,"r":"quorum","rw":"quorum","search":false,"small_vclock":50,"w":"quorum","young_vclock":20}}<br>
><br>
><br>
> Now When I executed my code again, I again got same problem for abc-client.<br>
> It again added precommit in abc-client.<br>
><br>
> curl  <a href="http://127.0.0.1:8098/riak/abc-client" target="_blank">http://127.0.0.1:8098/riak/abc-client</a><br>
><br>
> {"props":{"allow_mult":false,"basic_quorum":false,"big_vclock":50,"chash_keyfun":{"mod":"riak_core_util","fun":"chash_std_keyfun"},"dvv_enabled":false,"dw":"quorum","last_write_wins":false,"linkfun":{"mod":"riak_kv_wm_link_walker","fun":"mapreduce_linkfun"},"n_val":3,"name":"abc-client","notfound_ok":true,"old_vclock":86400,"postcommit":[],"pr":0,"precommit":[{"mod":"riak_search_kv_hook","fun":"precommit"}],"pw":0,"r":"quorum","rw":"quorum","search":true,"small_vclock":50,"w":"quorum","young_vclock":20}}<br>
><br>
> However it was still successfully storing data in abc-client1.<br>
><br>
> I am not able to understand root cause. Could you please let me know how to<br>
> stop adding precommit property in bucket.<br>
><br>
><br>
> Thanks<br>
><br>
><br>
><br>
><br>
><br>
> On Sat, Oct 11, 2014 at 9:10 AM, ayush mishra <<a href="mailto:ayushmishra2005@gmail.com">ayushmishra2005@gmail.com</a>><br>
> wrote:<br>
>><br>
>> Hi Luke,<br>
>><br>
>> Here is some part of source code:-<br>
>><br>
>> val bucketName = "abc-client" client.createBucket(bucketName).execute()<br>
>> val abc = new ABC(id, "abc")<br>
>> val bucket = client.fetchBucket(bucketName).execute()<br>
>> bucket.store(abc).execute()<br>
>><br>
>><br>
>> I don't think that I am using Riak Search. From the error log, it<br>
>> looks like there is a precommit hook defined in the properties for<br>
>> abc-client. Because  I also tried to  uninstall and install riak two<br>
>> times, but got same problem.<br>
>><br>
>><br>
>><br>
>> Is there any way to remove precommit hook?<br>
>><br>
>> On Sat, Oct 11, 2014 at 4:28 AM, Luke Bakken <<a href="mailto:lbakken@basho.com">lbakken@basho.com</a>> wrote:<br>
>> > Ayush,<br>
>> ><br>
>> > Are you using Riak Search? If so, are you using legacy search (1.0) or<br>
>> > Yokozuna (2.0) ?<br>
>> ><br>
>> > Could you please execute the store operation to the abc-client bucket<br>
>> > using curl instead of the Java client?<br>
>> > --<br>
>> > Luke Bakken<br>
>> > Engineer / CSE<br>
>> > <a href="mailto:lbakken@basho.com">lbakken@basho.com</a><br>
>> ><br>
>> ><br>
>> > On Fri, Oct 10, 2014 at 10:25 AM, ayush mishra<br>
>> > <<a href="mailto:ayushmishra2005@gmail.com">ayushmishra2005@gmail.com</a>> wrote:<br>
>> >> I have installed riak 2.0.1 on my machine. I am trying to store an<br>
>> >> object with a key in riak bucket. But I am stuck in a weird problem.<br>
>> >><br>
>> >> My actual bucket name is "abc-client".<br>
>> >><br>
>> >> When I try to save data in this bucket, I am getting below error on<br>
>> >> console:<br>
>> >><br>
>> >> [error] ! step error<br>
>> >> [error]   RiakRetryFailedException:<br>
>> >> com.basho.riak.client.http.response.RiakResponseRuntimeException:<br>
>> >> <html><head><title>500 Internal Server<br>
>> >> Error</title></head><body><h1>Internal Server Error</h1>The server<br>
>> >> encountered an error while processing this request:<br><pre>{error,<br>
>> >> [error]     {error,badarg,<br>
>> >> [error]         [{erlang,iolist_to_binary,<br>
>> >> [error]<br>
>> >> [{hook_crashed,{riak_search_kv_hook,precommit,error,badarg}}],<br>
>> >> [error]              []},<br>
>> >> [error]<br>
>> >> {wrq,append_to_response_body,2,[{file,"src/wrq.erl"},{line,215}]},<br>
>> >> [error]          {riak_kv_wm_object,handle_common_error,3,<br>
>> >> [error]              [{file,"src/riak_kv_wm_object.erl"},{line,1144}]},<br>
>> >> [error]          {webmachine_resource,resource_call,3,<br>
>> >> [error]<br>
>> >> [{file,"src/webmachine_resource.erl"},{line,186}]},<br>
>> >> [error]          {webmachine_resource,do,3,<br>
>> >> [error]<br>
>> >> [{file,"src/webmachine_resource.erl"},{line,142}]},<br>
>> >> [error]          {webmachine_decision_core,resource_call,1,<br>
>> >> [error]<br>
>> >> [{file,"src/webmachine_decision_core.erl"},{line,48}]},<br>
>> >> [error]          {webmachine_decision_core,accept_helper,1,<br>
>> >> [error]<br>
>> >> [{file,"src/webmachine_decision_core.erl"},{line,612}]},<br>
>> >> [error]          {webmachine_decision_core,decision,1,<br>
>> >> [error]<br>
>> >><br>
>> >> [{file,"src/webmachine_decision_core.erl"},{line,580}]}]}}</pre><P><HR><ADDRESS>mochiweb+webmachine<br>
>> >> web server</ADDRESS></body></html> (DefaultRetrier.java:81)<br>
>> >> [error]<br>
>> >> com.basho.riak.client.cap.DefaultRetrier.attempt(DefaultRetrier.java:79)<br>
>> >> [error]<br>
>> >> com.basho.riak.client.cap.DefaultRetrier.attempt(DefaultRetrier.java:81)<br>
>> >> [error]<br>
>> >> com.basho.riak.client.cap.DefaultRetrier.attempt(DefaultRetrier.java:81)<br>
>> >> [error]<br>
>> >> com.basho.riak.client.cap.DefaultRetrier.attempt(DefaultRetrier.java:81)<br>
>> >> [error]<br>
>> >> com.basho.riak.client.cap.DefaultRetrier.attempt(DefaultRetrier.java:53)<br>
>> >> [error]<br>
>> >> com.basho.riak.client.operations.StoreObject.execute(StoreObject.java:148)<br>
>> >><br>
>> >> But When I change bucket name from "abc-client" to "abc-client1", I am<br>
>> >> able to store data successfully.<br>
>> >><br>
>> >> Can anyone help me to resolve this? Thanks in advance<br>
>> >><br>
>> >> _______________________________________________<br>
>> >> riak-users mailing list<br>
>> >> <a href="mailto:riak-users@lists.basho.com">riak-users@lists.basho.com</a><br>
>> >> <a href="http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com" target="_blank">http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com</a><br>
><br>
><br>
</div></div></blockquote></div><br></div>