Rabbitmq Cluster: Unable to Connect to Nodes: Nodedown
I Have Installed Rabbitmq in Two Machines in Linux Os. and They All Worked Well. Then I Run the Command: Rabbitmqctl Join_Cluster Rabbit@Gz2, It's Not Work...
I have installed rabbitmq in two machines in linux OS.And they all worked well. Then I run the command:rabbitmqctl join_cluster rabbit@gz2, it's not work.And the error info :
Error: unable to connect to nodes [rabbit@gz2]: nodedown
attempted to contact: [rabbit@gz2]
rabbit@gz2:
- connected to epmd (port 4369) on gz2
- epmd reports node 'rabbit' running on port 25672
- TCP connection succeeded but Erlang distribution failed
- suggestion: hostname mismatch?
- suggestion: is the cookie set correctly?
- suggestion: is the Erlang distribution using TLS?
1 Answer
suggestion: is the cookie set correctly?
You need to ensure both RabbitMQ nodes are using the same cookie file. Copy the file /var/lib/rabbitmq/.erlang.cookie from one node to the other, then restart RabbitMQ on the node to which you copied the file. You will be able to create a cluster after that.
Clustering and the Erlang cookie is documented here.