On 1 Mar 2012, at 07:52, Norman Khine wrote:

> I hade created a bucket 'users', which i then deleted through the
> 'recon' interface (well i deleted all the keys within that bucket),
> but now every time i try to push a new key, i get this error:
> 
> { [Error: HTTP error 500: Error:
> {precommit_fail,{hook_crashed,{riak_search_kv_hook,precommit,error,badarg}}}
> ] statusCode: 500 }
> 

What is the output of
    
        curl localhost:8098/riak/users

?

Is search enabled? Do you mean for it to be enabled? You can get this error if 
you have the search precommit hook installed but search is not turned on in 
your app.config.

What does it say in your app.config for the setting 

%% Riak Search Config
 {riak_search, [
                %% To enable Search functionality set this 'true'.
                {enabled, false}
               ]},
?

Cheers

Russell

> here is the code:
> 
> 
>                               origin = /\/(.*)\.gif/.exec(request.url);
>                               if (origin) {
>                                       var ip = 
> request.connection.remoteAddress;
>                                       city = new City(__dirname + 
> "/GeoLiteCity.dat");
>                                       city.lookup(ip, function(err, location) 
> {
>                                                       obj = {
>                                                               city: 
> location.city
>                                                             , latitude:
> location.latitude
>                                                             , longitude:
> location.longitude
>                                                             , ip: ip
>                                                             , timestamp: time
>                                                       }
>                                                       
> self.bayeux.getClient().publish('/stat', obj);
>                                                       // write to riak cluster
>                                                       db.save('users', 
> 'username', obj, { index: {timestamp: time} });
>                                                       console.log('was saved 
> in the riak cluster');
> 
> if i change the bucket name 'users' to anything else this works, even
> if i then delete all the records from that ne bucket, i can still add
> records to that new named bucket. the only problem is with this
> 'users' bucket.
> 
> is there a way to check what is going on and clean up the database?

What is the output of
    
        curl localhost:8098/riak/users

?

Is there a value in the 'precommit' array? I don't know if recon would add a 
hook to the bucket (or if you did?), if there are hooks that you don't want it, 
you can remove all hooks with a post like

     curl -X PUT localhost:8098/riak/b -d'{"props": {"precommit":[]}}' 
-H'Content-Type: application/json'

Cheers

Russell

> 
> i have a single node on my local machine, running OSX.
> 
> thanks
> 
> norman
> 
> -- 
> %>>> "".join( [ {'*':'@','^':'.'}.get(c,None) or
> chr(97+(ord(c)-83)%26) for c in ",adym,*)&uzq^zqf" ] )
> 
> _______________________________________________
> riak-users mailing list
> riak-users@lists.basho.com
> http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com

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

Reply via email to