Bootstrap FreeKB - RabbitMQ - Join a node to a cluster using rabbitmqctl join_cluster
RabbitMQ - Join a node to a cluster using rabbitmqctl join_cluster

Updated:   |  RabbitMQ articles

Before you can join a node to a cluster, you must first stop the RabbitMQ application and reset the node. This can be done with the rabbitmqctl stop_app and rabbitmqctl reset commands.

IMPORTANT

Be aware that reset will remove all resources and data on the node.

rabbitmqctl stop_app
rabbitmqctl reset

 

Then the rabbitmqctl join_cluster command can be used.

AVOID TROUBLE

The Erlang cookie on each node must be identical. Typically, the file that contains the Erlang cookie is /var/lib/rabbitmq/.erlang.cookie. The RABBITMQ_ERLANG_COOKIE variable can be used to define the Erlang cookie on each RabbitMQ node.

 

Let's say this command is run on the node with hostname rabbit2.example.com. This command will create a cluster that contains both rabbit1.example.com and rabbit2.example.com.

rabbitmqctl join_cluster rabbit@rabbit1.example.com

 




Did you find this article helpful?

If so, consider buying me a coffee over at Buy Me A Coffee



Comments


Add a Comment


Please enter 5bf411 in the box below so that we can be sure you are a human.