Gracefully restart RabbitMQ cluster node

2,042 views
Skip to first unread message

buins...@gmail.com

unread,
Jan 24, 2017, 5:32:22 AM1/24/17
to rabbitmq-users
RabbitMQ version: 3.6.6
Cluster nodes:  A, B, C
Mirror queue: ha.test (master on A, slave on B)

I need to restart RabbitMQ on node A

What now I do: just call service rabbitmq-server restart.
On my centos it implemented as next commands:
rabbitmqctl stop
rabbitmqctl start

So, can you help me with understanding this "rabbitmqctl stop" procedure?

I need next behaviour, for example for A node:
1. node A send "close" to all connects and wait all clients closed connections
2. node A doesn`t accept new client connections
3. node A ensure than queue ha.test (which master on current node) have synchronized slaves, if no wait for sync
4. and only then stops

Is my expected behaviour the same as real rabbitmq implementation?



Michael Klishin

unread,
Jan 24, 2017, 5:48:13 AM1/24/17
to rabbitm...@googlegroups.com
Step 3 is a lot more involved than your description 
(in fact, there are several steps between 2 and 4 on your list) but basically, yes.

Step 2 is a side-effect of TCP listener shutdown. Client connections are forced to close early on.
--
You received this message because you are subscribed to the Google Groups "rabbitmq-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rabbitmq-user...@googlegroups.com.
To post to this group, send email to rabbitm...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

buins...@gmail.com

unread,
Jan 24, 2017, 6:08:40 AM1/24/17
to rabbitmq-users
Thanks for reply!

Can you help to find detailed description for third step? Maybe in source code?

Right now I testing and have next not nice for me behaviour:

In case when ha.test queue have not synchronized slaves I run service rabbitmq-server restart on master node for this queue
During restart any publish to this queue blocked, master don`t migrate to some slave and don`t try force sync some slave  =(

It is a problem, because restart may fail and we can lost queue


вторник, 24 января 2017 г., 13:48:13 UTC+3 пользователь Michael Klishin написал:
Reply all
Reply to author
Forward
0 new messages