Skip to content

hook_crashed,{riak_search_kv_hook,precommit,error,badarg} [JIRA: RIAK-2038] #770

@casertap

Description

@casertap

I am trying to set up solr to work with riak for optimized search.
I am getting very confused with all the different versions of the documentation.
It seems that riak as changed a lot in version 2.1 and many deprecated documentation still exists on the internet.

So in the config file I set:

search = on
search.solr.port = 8093

I have installed solr:

brew install solr
/usr/local/Cellar/solr/5.2.0/server/solr
mkdir new_core
cd configsets/basic_configs
cp -r conf/ ../../new_core/conf/

solr is up and running on port 8093 with its new core called new_core
I setup the hook:

curl -X POST -H "content-type:application/json" http://localhost:8098/riak/animals -H "Content-Type: application/json" -d '{"props":{"precommit":[{"mod":"riak_search_kv_hook","fun":"precommit"}]}}'

then I run

curl -X PUT http://localhost:8098/riak/animals/dragon -H "Content-Type: application/json" -d '{"nickname":"Dragon","breed":"Briard","score":1}'

<html><head><title>500 Internal Server Error</title></head><body><h1>Internal Server Error</h1>The server encountered an error while processing this request:<br><pre>{error,
    {error,badarg,
        [{erlang,iolist_to_binary,
             [{hook_crashed,{riak_search_kv_hook,precommit,error,badarg}}],
             []},
         {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,1178}]},
         {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,616}]},
         {webmachine_decision_core,decision,1,
             [{file,"src/webmachine_decision_core.erl"},{line,584}]}]}}</pre><P><HR><ADDRESS>mochiweb+webmachine web server</ADDRESS></body></html>

Now I am stuck. My hook is in place.
I do not find any documentation on how to remove this hook.

How can I make solr work with riak? and how can I remove the hook?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions