Hello everyone, I have been trying to follow the examples of hooks http://docs.basho.com/riak/2.0.0/dev/using/commit-hooks/, but allways obtained an error (see below).
 
I am using Riak 2.0.0. These are the commands that I am using.
  1. curl -XPUT -H "Content-Type: application/json" -d '{"props":{"precommit":[{"mod": "validate_demo", "fun": "validate"}]}}' http://127.0.0.1:8090/buckets/demo/props
  2.  
  3. curl http://localhost:8090/buckets/demo/props
  4.  
  5. curl -XPUT -H "Content-Type: application/json" -d '{scorew": 5}' http://127.0.0.1:8090/buckets/demo/keys/1
 
I checked list of precommit of the bucket and it is there, nevertheless obtained an error. I also checked the configuration (chkconfig) of my node (I'm using a single node) and is OK.
 
I'm using Mac OS X 10.10 (14A389a)

Any suggestion?
 
Thanks in advance,
Humberto
 
This is the structure directory
 
riak-2.0.0
-> bin
-> data
-> erts-5.10.3
-> etc
-> riak.conf
-> advanced.config
-> solr-log4j.properties
-> lib
-> log
-> releases
-> tmp
-> beams
->validate_demo.beam
 

Attachment: validate_demo.erl
Description: Binary data

Attachment: riak.conf
Description: Binary data

Attachment: advanced.config
Description: Binary data

Title: 500 Internal Server Error

Internal Server Error

The server encountered an error while processing this request:
{error,
    {error,badarg,
        [{erlang,iolist_to_binary,
             [{hook_crashed,{validate_demo,validate,error,undef}}],
             []},
         {wrq,append_to_response_body,2,[{file,"src/wrq.erl"},{line,215}]},
         {riak_kv_wm_object,handle_common_error,3,
             [{file,"src/riak_kv_wm_object.erl"},{line,1144}]},
         {webmachine_resource,resource_call,3,
             [{file,"src/webmachine_resource.erl"},{line,186}]},
         {webmachine_resource,do,3,
             [{file,"src/webmachine_resource.erl"},{line,142}]},
         {webmachine_decision_core,resource_call,1,
             [{file,"src/webmachine_decision_core.erl"},{line,48}]},
         {webmachine_decision_core,accept_helper,1,
             [{file,"src/webmachine_decision_core.erl"},{line,612}]},
         {webmachine_decision_core,decision,1,
             [{file,"src/webmachine_decision_core.erl"},{line,580}]}]}}


mochiweb+webmachine web server
riak.config Raw

_______________________________________________
riak-users mailing list
riak-users@lists.basho.com
http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com

Reply via email to