[rabbitmq-discuss] Problem with RabbitMQ HA cluster on EC2 (Windows)

Richard Urwin richard at psonar.com
Tue Oct 16 16:34:56 BST 2012

Hi Tim,


Thanks for the rapid response!


OK, so I added the following into each hosts file:


IP-0AF23E1E       10.XX.XX.XX

IP-0AD25792      10.XX.XX.XX


The names now match everywhere and are correctly mapped to the private IPs.


Now when I run:


C:\Program Files (x86)\RabbitMQ Server\rabbitmq_server-2.8.7\sbin>rabbitmqctl cluster rabbit at IP-0AF23E1E


I have success:


Clustering node 'rabbit at IP-0AD25792' with ['rabbit at IP-0AF23E1E'] ...



…and checking the cluster status with:


C:\Program Files (x86)\RabbitMQ Server\rabbitmq_server-2.8.7\sbin>rabbitmqctl cluster_status




Cluster status of node 'rabbit at IP-0AD25792' ...

[{nodes,[{disc,['rabbit at IP-0AF23E1E']},{ram,['rabbit at IP-0AD25792']}]},

{running_nodes,['rabbit at IP-0AF23E1E','rabbit at IP-0AD25792']}]





I had to open all of the ports within the EC2 security group and Windows firewall.


As mentioned, I have this (and only this) in my rabbit.config:


[{kernel, [{inet_dist_listen_min, 55700}, {inet_dist_listen_max, 55800}]}].


But it doesn’t appear to be restricting the ports (since when I restrict the firewalls back to that range, it can’t cluster.)


Can you see what’s wrong?






From: rabbitmq-discuss-bounces at lists.rabbitmq.com [mailto:rabbitmq-discuss-bounces at lists.rabbitmq.com] On Behalf Of Tim Watson
Sent: 16 October 2012 15:29
To: Discussions about RabbitMQ
Cc: <rabbitmq-discuss at lists.rabbitmq.com>
Subject: Re: [rabbitmq-discuss] Problem with RabbitMQ HA cluster on EC2 (Windows)



On 16 Oct 2012, at 13:46, "Richard Urwin" <richard at psonar.com> wrote:

Hi everyone,






The problem is when attempting to cluster. Running the command:


C:\Program Files (x86)\RabbitMQ Server\rabbitmq_server-2.8.7\sbin>rabbitmqctl cluster rabbit at ec2-XX-XX-XX-XX.compute-1.amazonaws.com


I get the result:


Clustering node 'rabbit at IP-0XXXXXXX' with ['rabbit at ec2- XX-XX-XX-XX.compute-1.amazonaws.com'] ...

Error: {no_running_cluster_nodes,['rabbit at ec2- XX-XX-XX-XX.compute-1.amazonaws.com'], ['rabbit at ec2- XX-XX-XX-XX.compute-1.amazonaws.com']}


I think this is because I’m attempting to use the EC2 Public DNS.


I then added mappings to my hosts file, to map to my two instances:


10.XXX.XX.XX     rabbit01               # Public DNS: ec2-XX-XX-XX-XX.compute-1.amazonaws.com

10.XXX.XX.XX     rabbit02               # Public DNS: ec2-XX-XX-XX-XX.compute-1.amazonaws.com


Running the command (with different hostname):


C:\Program Files (x86)\RabbitMQ Server\rabbitmq_server-2.8.7\sbin>rabbitmqctl cluster rabbit at rabbit02 <mailto:rabbit at ec2-XX-XX-XX-XX.compute-1.amazonaws.com> 


I get the same result:


Clustering node 'rabbit@ IP-0AAXXXXX’ with [rabbit at rabbit02] ...

Error: {no_running_cluster_nodes,[rabbit at rabbit02],[rabbit at rabbit02]}



Ok but what do those rabbits think the node names are?

I know this mapping can be used to access the other Windows computer, because I can use it to access the management console in a web browser:





That doesn't mean that erlang knows the nodes as rabbit at rabbit2 though.

I then tried to change the computer name from IP-0AAXXXXX to rabbit01 (in case this was a problem) but upon reboot, it hadn’t changed. 



When you start rabbit on the host, run rabbitmqctl status on the host itself and see what the node name looks like. This needs to match up so that all the nodes have a consistent view of the names. I would expect some /etc/hosts configuration to solve any naming difficulties. Remember that rabbit uses short names (without the domain) by default.

Does anyone have any suggestions?




rabbitmq-discuss mailing list
rabbitmq-discuss at lists.rabbitmq.com

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rabbitmq.com/pipermail/rabbitmq-discuss/attachments/20121016/48af0e43/attachment.htm>

More information about the rabbitmq-discuss mailing list