10 November 2012

Riak error: gen_server riak_core_capability terminated with reason: no function clause matching orddict:fetch

I was playing with Riak in the last days. After switching the http IP I got the following error when starting Riak:
root@riak3:~# riak start
Attempting to restart script through sudo -H -u riak
2012-11-10 23:09:31.750 [info] <0.7.0> Application lager started on node 'riak@192.168.219.131'
2012-11-10 23:09:31.800 [info] <0.148.0>@riak_core_ring_manager:reload_ring:226 Upgrading legacy ring
2012-11-10 23:09:31.890 [error] <0.158.0> gen_server riak_core_capability terminated with reason: no function clause matching orddict:fetch('riak@192.168.219.131', []) line 72
The fix was to remove the Riak ring and the start it again:
# rm -rf /var/lib/riak/ring/*
# riak start
Attempting to restart script through sudo -H -u riak
2012-11-10 23:12:13.759 [info] <0.7.0> Application lager started on node 'riak@192.168.219.131'
2012-11-10 23:12:13.808 [warning] <0.148.0>@riak_core_ring_manager:reload_ring:231 No ring file available.
2012-11-10 23:12:13.889 [info] <0.154.0>@riak_core_capability:process_capability_changes:529 New capability: {riak_core,vnode_routing} = proxy
2012-11-10 23:12:13.895 [info] <0.154.0>@riak_core_capability:process_capability_changes:529 New capability: {riak_core,staged_joins} = true
2012-11-10 23:12:13.904 [info] <0.7.0> Application riak_core started on node 'riak@192.168.219.131'
2012-11-10 23:12:13.926 [info] <0.263.0>@riak_core:wait_for_application:425 Waiting for application riak_pipe to start (0 seconds).
2012-11-10 23:12:13.926 [info] <0.7.0> Application riak_pipe started on node 'riak@192.168.219.131'
...

14 comments:

  1. I really can't emphasise Aaron's comment more. I've been scratching my head over this for a while, please accept all my internets as thanks.

    ReplyDelete
  2. Hi even I am having this error. I did remove the contents of the ring directory and started riak again. But am still getting this error:
    Attempting to restart script through sudo -H -u riak
    Riak failed to start within 15 seconds,
    see the output of 'riak console' for more information.
    If you want to wait longer, set the environment variable
    WAIT_FOR_ERLANG to the number of seconds to wait.
    Can anybody help me out with this?
    Thanks !

    ReplyDelete
  3. Hi even I am having this error. I did remove the contents of the ring directory and started riak again. But am still getting this error:
    Attempting to restart script through sudo -H -u riak
    Riak failed to start within 15 seconds,
    see the output of 'riak console' for more information.
    If you want to wait longer, set the environment variable
    WAIT_FOR_ERLANG to the number of seconds to wait.
    Can anybody help me out with this?
    Thanks !

    ReplyDelete
  4. @Alaka
    did you stopped riak before removing the files from the ring?

    ReplyDelete
    Replies
    1. Yes. I had already been stopped.

      Delete
    2. check the configs if the IPs are right. I always used IPs instead of hostnames. check /etc/hosts if it has the hostname as well, in case DNS doesn't work...

      then try again :-)

      Delete
    3. Thanks Stefan. I found the solution to my problem. I was running the commands as root user. When I tried using the same commands as non-root user with sudo prefix, everything just worked fine ! :)

      Delete
  5. Thank you for this tip. I was not sure how to handle this. You are a life-saver.

    ReplyDelete
  6. ... google is instrumental and so are you! ...

    ReplyDelete