[rabbitmq-discuss] [Q] Cluster configuration is not retained by node after restart

Simon MacMullen simon at rabbitmq.com
Wed Jun 27 14:31:13 BST 2012


By "reclustering" I just mean reissuing "rabbitmqctl reset" "rabbitmqctl 
cluster ..." commands, and thus redefining the cluster.

Alternatively, could something be removing files from 
/var/lib/rabbitmq/mnesia/ ?

Cheers, Simon

On 27/06/12 14:24, Simon Loewenthal wrote:
> Hi Simon,
>
>     I rebooted both servers :  /# reboot/
>     You've given a good reason to move to 2.8.n
>
>     >  Are you definitely not reclustering at any stage?
>     Apologies, but I don't  understand the term reclustering.
>
> S.
>
>
>
> On 27/06/12 15:20, Simon MacMullen wrote:
>> Hi.
>>
>> You say you "reboot the server" - is this node 1, node 2, or both?
>>
>> The description you have after rebooting the server is consistent with
>> having one RAM node and one disc node and restarting both of them - in
>> 2.7.0 if the RAM node came back up first it would create a blank
>> database. This was fixed in 2.8.x, in that now a RAM node will refuse
>> to start if there are no disc nodes to connect to.
>>
>> However, when you initially create the cluster you are creating both
>> nodes as disc nodes. So I am puzzled as to how you could have got to
>> the state where one node was a RAM node. Are you definitely not
>> reclustering at any stage?
>>
>> Cheers, Simon
>>
>> On 27/06/12 12:48, S.Loewenthal wrote:
>>> Hi there,
>>>
>>> I installed RabbitMQ server but cannot get one node to retain the
>>> cluster configuration. Step-by-step account follows for what I did to
>>> configure these nodes.
>>> Node 1: rabbit at iuu-7
>>> Nide 2: rabbit at iuu-8
>>>
>>>
>>> On both nodes install 2.7.0 - This version as all other environment run
>>> same version.
>>> # rpm -ivh rabbitmq-server-2.7.0-1.noarch.rpm
>>>
>>> Start Node 2 (if not already running)
>>> # /etc/init.d/rabbitmq-server start
>>>
>>> Shutdown RabbitMQ on Node 2
>>> # /etc/init.d/rabbitmq-server stop
>>>
>>> Copied the Erlang cookie so that both nodes have the same cookie, or
>>> else these won't talk with each other
>>> Copy (Node 1) iuu-7:/var/lib/rabbitmq/.erlang.cookie to (Node 2)
>>> iuu-8:/var/lib/rabbitmq/.erlang.cookie
>>> permissions and ownership are : Perms 400 -- Owner rabbitmq:rabbitmq
>>>
>>> Start RabbitMQ on Node 2
>>> # /etc/init.d/rabbitmq-server start
>>>
>>> Verify that each node can communicate with each other:
>>> On Node 1
>>> $ rabbitmqctl -n rabbit at iuu-8 status
>>> On Node 2
>>> $ rabbitmqctl -n rabbit at iuu-7 status
>>>
>>> Reset Node 2 so that it is ready to join the cluster on Node 1
>>> $ rabbitmqctl stop_app
>>> $ rabbitmqctl reset
>>>
>>> Add the Node 2 to the first node with disc writing enabled on both
>>> nodes:
>>> $ rabbitmqctl cluster rabbit at iuu-7 rabbit at iuu-8
>>>
>>> Start the app on Node 2
>>> $ rabbitmqctl start_app
>>>
>>> Verify the cluster status on Node 2 and the same on Node 1
>>> $ rabbitmqctl cluster_status
>>> Cluster status of node 'rabbit at iuu-8' ...
>>> [{nodes,[{disc,['rabbit at iuu-8','rabbit at iuu-7']}]},
>>> {running_nodes,['rabbit at iuu-7','rabbit at iuu-8']}]
>>> ...done.
>>>
>>> next I add a few users, and reboot the server. Now the cluster is
>>> disconnection, and I cannot get ot to connnect. Also, the users added
>>> afore the reboot no longer exist.
>>>
>>> It comes up without the cluster information nor the users:
>>> [root at iuu-7 ~]# rabbitmqctl cluster_status
>>> Cluster status of node 'rabbit at iup-7' ...
>>> [{nodes,[{ram,['rabbit at iuu-7']}]},{running_nodes,['rabbit at iuu-7']}]
>>> ...done.
>>>
>>> [root at iup-8 ~]# rabbitmqctl cluster_status
>>> Cluster status of node 'rabbit at iup-' ...
>>> [{nodes,[{disc,['rabbit at iup-8']},{ram,['rabbit at iup-7']}]},
>>> {running_nodes,['rabbit at iup-8']}]
>>> ...done.
>>>
>>> The cluster configuration does not survive a server restart and in this
>>> case user account was was lost. I imagine that I have misconfigured
>>> something.
>>>
>>> ** The question **
>>> How can I ensure that the cluster reconnects after rabbitmq-server
>>> restarts, and that data that was written is retained? Or, what did I
>>> misconfigure
>>>
>>>
>>>
>>> Many thanks, S.
>>>
>>>
>>> _______________________________________________
>>> rabbitmq-discuss mailing list
>>> rabbitmq-discuss at lists.rabbitmq.com
>>> https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss
>>
>>
>
>


-- 
Simon MacMullen
RabbitMQ, VMware


More information about the rabbitmq-discuss mailing list