Creating a RabbitMQ Cluster - Mission Control 3.2.0.0

Genetec Mission Controlâ„¢ Deployment Guide 3.2.0.0

Product
Mission Control
Content type
Guides > Deployment guides
Version
3.2
Release
3.2.0.0
Language
English
Last updated
2024-09-20

A RabbitMQ cluster is a feature that enables the synchronization of state data and configurations of multiple nodes in a real-time networked environment.

Procedure

To create a RabbitMQ cluster:

  1. Copy the .erlang.cookie files from the node 1 by following the below steps:
    1. Open the RabbitMQ Command Prompt (sbin dir) on the machine you want to copy the erlang_cookie.
    2. Run the following command:
      Code
      rabbitmq-diagnostics.bat erlang_cookie_sources 
    3. Take note of the erlang.cookie file path.
    4. Copy the erlang.cookie from that file path.
    5. In your Windows system, overwrite the erlang.cookie file in the below locations on node 1:
      • %USERPROFILE%

        This usually leads to C:\Windows\ServiceProfiles\LocalService\ for a service

      • %HOMEDRIVE%%HOMEPATH%

        This usually leads to C:\Users\<username>

      • C:\
      • C:\Windows\System32\config\systemprofile
    NOTE: You should use the same cookie file path for all destination nodes but ensure that the same erlang.cookie is overwritten on all locations of each node.
  2. Copy the following certificate files from the node 1 and overwrite them to the other nodes:
    • CACert.pem
    • Cert.pem
    • Key.pem
    • CAKey.pem

    By default, these files are found in C:\Program Files (x86)\Genetec\RabbitMQ\.

    NOTE: If the Incident Manager role is on a separate machine, then you must copy the certificates from the RabbitMQ server to the server hosting the Incident Manager role.

Modify the RabbitMQ configuration files on the node 1 to enable partition handling:

  1. Right-click the Notepad application, select Run as administrator, and then open the RabbitMQ.conf file in Notepad.
    By default, the RabbitMQ configuration file RabbitMQ.conf, is found in C:\ProgramData\Genetec\RabbitMQ\config.
    Tip: Using Notepad++ with Makefile set as language improves the readability of the file.
  2. Modify the following line from:
    Code
    Code
    # cluster_partition_handling = pause_minority
    cluster_partition_handling = pause_minority
    to:By removing the # symbol, the line is no longer flagged as a comment and becomes part of the code.
  3. Save the file.

Reinstall the RabbitMQ service to enable the configuration file changes:

  1. In Windows search box, type navigate RabbitMQ Command Prompt (sbin dir).
  2. Right-click and select Run as administrator.
    This is installed with RabbitMQ by default.
  3. Execute the following commands:
    1. rabbitmq-service.bat remove
      When successfully executed, the following message is displayed:
      Service RabbitMQ removed from system
    2. rabbitmq-service.bat install
      When successfully executed, the following message is displayed:
      Service RabbitMQ added to system
    3. rabbitmq-service.bat start
      When successfully executed, the following message is displayed:
      The RabbitMQ service is starting. The RabbitMQ service was started successfully.

Ensure that your modified configuration file is loaded in memory:

  1. In the RabbitMQ Command Prompt application, execute the following command: rabbitmqctl.bat environment
    When successfully executed, the content of the RabbitMQ.conf file is loaded in memory and the following message is displayed in a format similar to a JSON file:
    Application environment of node rabbit@<User>
  2. Verify that your modifications have been implemented correctly:
    1. Ensure that the modified configuration reads as follows:
      Code
      cluster_partition_handling = pause_minority
    2. If the line of code does not read as in the previous step, modify it to match.

Copy the modified RabbitMQ.conf file to the other nodes:

  1. Copy the modified RabbitMQ.conf file from the node 1.
    The default location of the config file is C:\ProgramData\Genetec\RabbitMQ\config\.
  2. Overwrite the existing RabbitMQ.conf file in the same file path of the destination nodes.
    It is recommended to do a backup before you overwrite the existing files.
  3. Reinstall RabbitMQ service for each node.