{error, timeout}

Bryan Fink bryan at basho.com
Fri Oct 9 08:30:12 EDT 2009


On Fri, Oct 9, 2009 at 3:36 AM, stewart mackenzie <setori88 at gmail.com> wrote:
> Oh dear I realize I was connecting to the client!
> Where as I should have been connection to riakdemo at 127.0.0.1
> instead by calling riak:local_client(). i was getting an instance of the
> client.
> Then when I try connecting to the server.... (which is running)
> $ ./riak_demo.escript  config/riak-demo.erlenv
> Attempting to connect to 'riakdemo at 127.0.0.1' with cookie
> riak_demo_cookie...
> Connected successfully
> Looking for pre-existing object at {<<"riak_demo">>, <<"demo">>}...
>   Pre-existing object found, modifying
> Storing object with new value...
>   Written successfully
> Fetching object at {<<"riak_demo">>, <<"demo">>}...
>   Fetched successfully
>   Object contained correct value
> SUCCESS
> (riaktest at 127.0.0.1)3> {ok, C} = riak:client_connect('riakdemo at 127.0.0.1').
> ** exception error: no match of right hand side value
>                     {error,{could_not_reach_node,'riakdemo at 127.0.0.1'}}
> (riaktest at 127.0.0.1)4> {ok, C} = riak:client_connect('127.0.0.1').
> ** exception error: no match of right hand side value
>                     {error,{could_not_reach_node,'127.0.0.1'}}
> (riaktest at 127.0.0.1)5>

Hi, Stewart.  The most likely cause for the could_not_reach_node error
here is a mismatch of cookies between your riak node and your client
node.  Try this:

1> erlang:set_cookie('riakdemo at 127.0.0.1', riak_demo_cookie).
2> {ok, C} = riak:client_connect('riakdemo at 127.0.0.1').

-Bryan



More information about the riak-users mailing list