-
Notifications
You must be signed in to change notification settings - Fork 1
U1.12 Ubuntu Quick Start (QS): RabbitMq Cluster
chempkovsky edited this page Dec 29, 2021
·
7 revisions
- Clustering is intended to facilitate scalability, not availability!!!
- read the article High availability with Pacemaker and DRBD. (This link is no longer available)
- read the article Reliability Guide
- read the article Clustering Guide
- repeat the steps of the article RabbitMq deploy to host
- as a result, we have two RabbitMq servers deployed on two virtual machines
-
Step 1: for u200401 show ip address
- run the command "ip a"
Click to show the picture
-
Step 2: for u200402 show ip address
- run the command "ip a"
Click to show the picture
- /etc/hosts files
-
Step 3: modify /etc/hosts as shown below
- run the command
sudo nano /etc/hosts
Click to show the picture
-
Step 4: modify /etc/hosts as shown below
- run the command
sudo nano /etc/hosts
Click to show the picture
- /var/lib/rabbitmq/.erlang.cookie files
- Note: the cookie must be the same on both servers
-
Step 5: modify /var/lib/rabbitmq/.erlang.cookie as shown below
- run the command
sudo nano /var/lib/rabbitmq/.erlang.cookie
Click to show the picture
-
Step 6: modify /var/lib/rabbitmq/.erlang.cookie as shown below
- run the command
sudo nano /var/lib/rabbitmq/.erlang.cookie
Click to show the picture
- Step 7: run the command
sudo systemctl restart rabbitmq-server
- Step 8: run the command
sudo systemctl restart rabbitmq-server
- Step 9: On both machines run diagnostics commands:
sudo rabbitmq-diagnostics -n rabbit@u200401 ping
sudo rabbitmq-diagnostics -n rabbit@u200402 ping
sudo rabbitmq-diagnostics -n rabbit@u200401 check_running
sudo rabbitmq-diagnostics -n rabbit@u200402 check_running
- Step 10: On both machines run the command:
sudo rabbitmq-server -detached
sudo rabbitmqctl cluster_status
- Step 11: run the commands
sudo rabbitmqctl stop_app
sudo rabbitmqctl reset
sudo rabbitmqctl join_cluster rabbit@u200401
sudo rabbitmqctl start_app
Click to show the picture
sudo rabbitmqctl cluster_status
Click to show the picture
- using browser go to
http://localhost:15672/
- here is a result