My "master" is node1 which in vm.args as the node name of riak@10.79.108.25.
So from the "master" (riak@10.79.108.25) I issue the command 'sudo
riak-admin cluster join riak@10.79.108.15' (essentially joining to itself) I
get:

[azureuser@bsicentos1 ~]$ sudo riak-admin cluster join riak@10.79.108.25
[sudo] password for azureuser:
Attempting to restart script through sudo -H -u riak
Join failed. Try again in a few moments.

To make sure the "master" is indeed the name I thought

[azureuser@bsicentos1 ~]$ head /etc/riak/vm.args
## Name of the riak node
-name riak@10.79.108.25

It doesn't seem that you can join a node to itself.

-----Original Message-----
From: Shane McEwan [mailto:sh...@mcewan.id.au] 
Sent: Wednesday, December 12, 2012 9:26 AM
To: Kevin Burton
Cc: riak-users@lists.basho.com
Subject: Re: Cluster setup

The join command needs to be given a node name and IP of a machine already
in the cluster.

So if you have machines:

riak@10.79.110.52
riak@10.79.108.25
riak@10.79.90.11

Then pick one to be the "master" (e.g. riak@10.79.110.52) and on the other
two machines run:

sudo riak-admin cluster join riak@10.79.110.52

(Notice that you give the name and IP of the "master" node, not the name and
IP of the machine you're running the command on.)

Then back on the master run the "plan" and "commit" commands.

On 12/12/12 15:11, Kevin Burton wrote:
> I was just following the docs and they seem to set a different port or 
> each node but that was probably because the "Quick Start" was on one
machine.
> Thanks for the clarification.
>
> Now I am running into a different problem. I joined one machine to the 
> cluster just fine. But joining the third node to the cluster results in:
>
> [azureuser@bsicentos1 ~]$ sudo riak-admin cluster join 
> riak@10.79.90.11 Attempting to restart script through sudo -H -u riak
> Failed: This node is already a member of a cluster
>
> But looking at the plan I don't see that it is "already a member". How 
> is it already a member?
>
> [azureuser@bsicentos1 ~]$ sudo riak-admin cluster plan Attempting to 
> restart script through sudo -H -u riak =============================== 
> Staged Changes ================================
> Action         Nodes(s)
> ----------------------------------------------------------------------
> ------
> ---
> join           'riak@10.79.108.25'
> ----------------------------------------------------------------------
> ------
> ---
>
>
> NOTE: Applying these changes will result in 1 cluster transition
>
> ######################################################################
> ######
> ###
>                           After cluster transition 1/1 
> ######################################################################
> ######
> ###
>
> ================================= Membership 
> ==================================
> Status     Ring    Pending    Node
> ----------------------------------------------------------------------
> ------
> ---
> valid       0.0%     50.0%    'riak@10.79.108.25'
> valid     100.0%     50.0%    'riak@10.79.110.52'
> ----------------------------------------------------------------------
> ------
> ---
> Valid:2 / Leaving:0 / Exiting:0 / Joining:0 / Down:0
>
> WARNING: Not all replicas will be on distinct nodes
>
> Transfers resulting from cluster changes: 32
>    32 transfers from 'riak@10.79.110.52' to 'riak@10.79.108.25'
>
> -----Original Message-----
> From: Shane McEwan [mailto:sh...@mcewan.id.au]
> Sent: Wednesday, December 12, 2012 8:58 AM
> To: Kevin Burton
> Cc: riak-users@lists.basho.com
> Subject: Re: Cluster setup
>
> On 12/12/12 14:32, Kevin Burton wrote:
>> Good catch! Thank you.  If I have three machines that take up ports 
>> 8098,8099, and 8100 what do you suggest the handoff port should be?
>> When is it used?
>
> No problem!
>
> Each machine can use the same ports as the other machines. You just 
> can't use the same ports on the same machine. Setting different port 
> numbers on different machines just complicates things for no reason. 
> In theory, your app.config file can (should?) be identical for all 
> your Riak nodes in a cluster.
>
> So, for instance, if you decided to use ports 8098 for pb_port, 8099 
> for http and 8100 for handoff_port then you could set those ports the 
> same on all three of your machines.
>
> The handoff_port is used for each node of the cluster to talk to each
other.
>
> Hope this helps!
>
> Shane.
>


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

Reply via email to