Hello all!

I'm using rabbitMQ 2.6.1's mirror queue without 'x-ha-policy' (yet!), and
I just found a weird situation.

I'm using keepalived to exchange IP address from clients, and my queues are
"Durable=True"

====
[root at qwar1 ~]# rabbitmqctl cluster_status
Cluster status of node rabbit at qwar1 ...
[{nodes,[{disc,[rabbit at qwar2,rabbit at qwar1]}]},
{running_nodes,[rabbit at qwar2,rabbit at qwar1]}]
...done.

[root at qwar2 ~]# rabbitmqctl cluster_status
Cluster status of node rabbit at qwar2 ...
[{nodes,[{disc,[rabbit at qwar2,rabbit at qwar1]}]},
{running_nodes,[rabbit at qwar1,rabbit at qwar2]}]
...done.
====

All my queues are created on node _qwc1_, how you can see here:

====
[root at qwar1 ~]# rabbitmqctl report
...
Consumers on encoder:
queue_name channel_pid consumer_tag ack_required
videos <rabbit at qwar1.3.2926.0> amq.ctag-7FoHaypQdRWWanL5CYjXug== true
sender <rabbit at qwar1.3.26415.0>
amq.ctag-6YYXJJxU/LsoGFpBTn47FA== true
...

[root at qwar2 ~]# rabbitmqctl report
...
Consumers on encoder:
queue_name channel_pid consumer_tag ack_required
videos <rabbit at qwar1.3.2926.0> amq.ctag-7FoHaypQdRWWanL5CYjXug== true
sender <rabbit at qwar1.3.26415.0>
amq.ctag-6YYXJJxU/LsoGFpBTn47FA== true
...
====

If I shutdown the _qwc2_ everything works as well.

If I shutdown the _qwc1_ the cluster stop to work, and I got this errors
messages on log:

=ERROR REPORT==== 30-Nov-2011::16:34:36 ===
connection <0.734.0>, channel 4 - error:
{amqp_error,not_found,"no queue 'videos' in vhost
'encoder'",'queue.declare'}

=ERROR REPORT==== 30-Nov-2011::16:34:36 ===
connection <0.734.0>, channel 5 - error:
{amqp_error,not_found,"no queue 'videos' in vhost
'encoder'",'queue.declare'}

=ERROR REPORT==== 30-Nov-2011::16:30:26 ===
connection <0.5263.0>, channel 1 - error:
{amqp_error,not_found,"no queue 'sender' in vhost
'encoder'",'queue.declare'}

=ERROR REPORT==== 30-Nov-2011::16:30:27 ===
connection <0.5263.0>, channel 1 - error:
{amqp_error,not_found,"no queue 'sender' in vhost
'encoder'",'queue.declare'}

When the node qwc1 turn back to live, everything works as well.

If, before the shutdown, I delete the queue 'videos' and 'sender',
everything works as well.

Is the behaviour correct? I thought that everything was still working as
well even with a crash of one of nodes of cluster :)

Thanks a lot,

Tiago Cruz
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rabbitmq.com/pipermail/rabbitmq-discuss/attachments/20111130/b3ea9ab5/attachment.htm>

Search Discussions

  • Simon MacMullen at Dec 1, 2011 at 10:18 am

    On 30/11/11 20:18, Tiago Cruz wrote:
    I'm using rabbitMQ 2.6.1's mirror queue without 'x-ha-policy' (yet!),
    and I just found a weird situation.

    I'm using keepalived to exchange IP address from clients, and my queues
    are "Durable=True"
    <snip>

    If you're not using x-ha-policy, then you are not using mirrored queues.
    By default queues only exist on one node (qwc1 in your case).
    If I shutdown the _qwc2_ everything works as well.

    If I shutdown the _qwc1_ the cluster stop to work, and I got this errors
    messages on log: <snip>
    When the node qwc1 turn back to live, everything works as well.

    If, before the shutdown, I delete the queue 'videos' and 'sender',
    everything works as well.

    Is the behaviour correct? I thought that everything was still working as
    well even with a crash of one of nodes of cluster :)
    The behaviour is as designed. If you declare a queue on a single node,
    and then that node goes down, attempts to redeclare it return not_found.
    The idea is that when the node comes back up we want the queue to still
    be there - so while it is down Rabbit won't just recreate it on one of
    the other nodes, since then when the node does come back up again you
    would have two copies of the same queue.

    But it sounds like you want mirrored queues, so use 'x-ha-policy'.

    Cheers, Simon

    --
    Simon MacMullen
    RabbitMQ, VMware

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouprabbitmq-discuss @
categoriesrabbitmq
postedNov 30, '11 at 8:18p
activeDec 1, '11 at 10:18a
posts2
users2
websiterabbitmq.com
irc#rabbitmq

2 users in discussion

Simon MacMullen: 1 post Tiago Cruz: 1 post

People

Translate

site design / logo © 2022 Grokbase