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

S.Loewenthal simon at klunky.co.uk
Wed Jun 27 12:48:42 BST 2012


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.




More information about the rabbitmq-discuss mailing list