How to fix the 'RPC to riak@<address>' failed error

by Kasper Tidemann

Riak version 1.3.0 was released a couple of days ago and it contains a very exciting set of new features. You’ve probably already upgraded by now – congratulations!

If you make use of Riak Search by using the search-cmd in the terminal, you might be seeing this error when attempting to perform a search for something:

$ search-cmd search bucket "some_property:some_value"

 :: Searching for 'some_property:some_value' / '' in bucket...


RPC to 'riak@' failed: {'EXIT',

That’s a somewhat cryptic error that looks like something is fatally wrong. But don’t worry, it’s just caused by Riak Search not being enabled in your app.config file.

First of all, locate your app.config file. If you’ve installed via Homebrew, this will be located at /usr/local/Cellar/riak/1.3.0-x86_64/libexec/etc/app.config.

Then, change line 193 from being {enabled, false} to {enabled, true}, restart Riak and everything will work again.

(In general, whenever you upgrade Riak, be sure to port over the options you’ve previously configured – otherwise you’ll risk seeing some unexpected behavior.)