Error Creating cluster in RabbitMQ on EC2
I want to create a cluster of RabbitMQ on EC2. I have created an AMI of Ubantu and install the rabbitmq-server-2.3.1 on it. I have also installed the management plugins for GUI. For cluster purpose I have also copied the .erlang.cookie file in another node. My ploblem is when I am trying to connect with another node it gives me following error:
Error: {failed_to_cluster_with,['rabbit@ip-10-58-54-170'], "Mnesia could not co开发者_Python百科nnect to some nodes."}
Anybody has any idea why it is happening?
There are a few usual causes for "Mnesia could not connect to some nodes":
- the nodes cannot actually communicate with each other (can you
ping
the other hosts?), - Erlang restrictions prevent you from naming nodes in certain ways (e.g. FQDMs are not supported, the node name must be a single word) so you usually have to add the node addresses to your hosts file,
- the two nodes have different cookies (not the case here),
- Rabbit is not running on the remote node.
To quickly diagnose the issue:
check connectivity:
ping other_node
check that Erlang can connect to other_node:
erl -sname my_node -remsh rabbit@other_node
check that Rabbit is running on the remote node:
rabbitmqctl -n other_node status
Quite a few people have managed to get RabbitMQ clusters working on EC2, so it's certainly possible.
If you need more help, a great place to ask is the RabbitMQ Discuss mailing list. The developers make a point of answering the questions asked.
In my case under Ubuntu 11.10 it helped to
#rabbitmqctl cluster MASTER SLAVE
#rabbitmqctl start_app
before I always got this error message...
精彩评论