Troubleshooting Riak - IP address problems

Go back to Table of Contents

This article refers to Riak version 0.7.1

I had been running Riak for some time on my Mac Pro and I was just starting to write the article on clustering when suddenly my local Mac installation stopped working. I tried to start Riak but nothing happened:

cd $RIAK         # used "export RIAK=/path/to/your/riak/node"
                 # "set" to see current environment variables
bin/riak/start
bin/riak ping

: and it returned :

Node 'riak@192.168.1.3' not responding to pings. 

At this point I did not know so much about the logging system so I just looked at all the logs:

ls log

erlang.log.1    run_erl.log    sasl        sasl-error.log

sasl is a directory so I did :

ls log/sasl

: which returned :

1    2    3    4    5    index

None of this meant anything to me so I looked up what all the Riak logging files do:

riak
    erl_crash.dump
    log
        erlang.log.1
        run_rel.log
        sasl-error.log
        sasl
            1
            2
            3
            4
            5
            index

: So, above is a list of what is contained in the logging files:

erl_crash.dump - This is an Erlang specific log and is written whenever Erlang exits abnormally:

http://ftp.sunet.se/pub/lang/erlang/doc/apps/erts/crash_dump.html

erlang.log.1 - contains Erlang specific messages

sasl-error.log - This is a Riak specific error log

1, 2, 3, 4, 5, index - I'm not sure what these are for but they seem to be some sort of Binary log

So I looked at sasl-error.log and saw:


=SUPERVISOR REPORT==== 12-Feb-2010::13:43:21 ===
     Supervisor: {local,riak_sup}
     Context:    start_error
     Reason:     eaddrnotavail
     Offender:   [{pid,undefined},
                  {name,webmachine_mochiweb},
                  {mfa,
                      {webmachine_mochiweb,start,
                          [[{ip,"192.168.1.3"},
                            {port,8098},
                                                                    ....

: To be honest this wasn't very helpful, but upon seeing eaddrnotavail  I guessed it may have been an IP address issue so I issued:

ifconfig

Upon seeing this I saw that the IP address of my machine was :

192.168.1.4

: what had happened was that my IP address was updated via DHCP when I rebooted my machine (silly me for not using a static IP address).

Anyway, I amended the IP address Riak uses by amending:

etc/vm.args
    -name uskynet@192.168.1.4

etc/app.config
    {riak_web_ip, "192.168.1.4"},

: cleared the Ring data (never forget this!):

rm data/ring/*


: and then restarted Riak:

bin/riak start
bin/riak-admin test

: producing :

=INFO REPORT==== 12-Feb-2010::20:42:16 ===
Successfully completed 1 read/write cycle to 'riak@192.168.1.4'

: and all worked fine! So this is something I think alot of first time users will experience, and hopefully won't spend as much time banging their head against the wall as I did :)

No comments:

Post a Comment