[rabbitmq-discuss] RabbitMq and clustering

Thomas Sanchez thomas.sanchz at gmail.com
Sat Jul 24 05:11:25 BST 2010


So I could start a cluster and play with some rabbitmq nodes + an
haproxy !

So, if it can help someone:
- Each node need to know each others nodes. I used the /etc/hosts file
BUT
hostname cannot contains `.`. I did not try with `-`.
Moreover rabbitmq won't be able to start if it cannot resolve its
hostname. So you have
to add (it is not already present) in /etc/hosts a line like this:
127.0.0.1 YOURHOSTNAME

- Each node must have the same erlang cookie (located in: /var/lib/
rabbitmq/.erlang.cookie). I did not try to set it as parameter.

- Port 5672, 4369 and the port for rabbit nodes wich is dynamically
determined BUT it can be fixed by adding this lines:
-kernel inet_dist_listen_min PORT
-kernel inet_dist_listen_max PORT
as argument in file: /usr/lib/rabbitmq/bin/rabbitmq-server.

If you set the same port in the two line, obviously it'll be the
chosen port.

I hope this can help somebody, but I think that the documentation
should mention this.

Regards.

On Jul 21, 5:30 pm, Thomas Sanchez <thomas.san... at gmail.com> wrote:
> Thanks for your response, it can be a port issue.
> I've to check that
>
> Thanks !
>
> On Jul 21, 3:36 pm, Dave Greggory <davegregg... at yahoo.com> wrote:
>
>
>
> > Just to clarify, I got this problem when I was trying out 1.7.2 and it gave no
> > indication of any problems in any of the logs. I just saw the rabbtmqctl status
> > didn't list the two nodes. The error you're seeing may not be related to ports
> > not being open but it's something to double check.
>
> > ----- Original Message ----
> > From: Dave Greggory <davegregg... at yahoo.com>
> > To: rabbitmq-disc... at lists.rabbitmq.com
> > Sent: Wed, July 21, 2010 6:33:52 PM
> > Subject: Re: [rabbitmq-discuss] RabbitMq and clustering
>
> > You need to have more ports open than just the regular 5672. This one bit me as
> > well.
>
> > Seehttp://old.nabble.com/Re%3A-problems-with-rabbitmq-cluster-across-2%0...
>
> > andhttp://www.joshdevins.net/2010/03/21/rabbitmq-cluster-auto-configurat...
>
> > ----- Original Message ----
> > From: Thomas Sanchez <thomas.san... at gmail.com>
> > To: rabbitmq-disc... at lists.rabbitmq.com
> > Sent: Wed, July 21, 2010 6:27:05 PM
> > Subject: [rabbitmq-discuss] RabbitMq and clustering
>
> > Hi guys,
>
> > I'm trying to setup a cluster.
> > I followed the documentation here:http://www.rabbitmq.com/clustering.html
>
> > root at lucid:~# cat /etc/hosts
> > 127.0.0.1   localhost
> > 127.0.1.1   lucid
> > 10.252.XXX.XXX
> > rabbit1
>
> > root at lucid:~# rabbitmqctl stop_app
> > Stopping node rabbit at lucid ...
> > ...done.
> > root at lucid:~# rabbitmqctl reset
> > Resetting node rabbit at lucid ...
> > ...done.
> > root at lucid:~# rabbitmqctl cluster rabbit at rabbit1
> > Clustering node rabbit at lucid with [rabbit at rabbit1] ...
> > Error: {failed_to_cluster_with,[rabbit at rabbit1],
> >                                "Mnesia could not connect to some nodes."}
>
> > There is nothing in log.
> > I'm running the 1.8.1 version of rabbitmq (installed from .deb package)
>
> > erlang:
> > Erlang (BEAM) emulator version 5.7.4
> > Compiled on Fri Apr  9 11:08:48 2010
>
> > Have you some ideas on what happens ?
>
> > Thanks.
>
> > --
> > Thomas Sanchez
> > _______________________________________________
> > rabbitmq-discuss mailing list
> > rabbitmq-disc... at lists.rabbitmq.comhttps://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss
>
> > _______________________________________________
> > rabbitmq-discuss mailing list
> > rabbitmq-disc... at lists.rabbitmq.comhttps://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss
>
> _______________________________________________
> rabbitmq-discuss mailing list
> rabbitmq-disc... at lists.rabbitmq.comhttps://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss


More information about the rabbitmq-discuss mailing list