Install Erlang OTP and RabbitMQ - Integration - Ver. 3.7.0.3 - Administration & Configuration - Hexagon

HxGN VDS Install and Setup

Language
English
Product
Integration
Search by Category
Administration & Configuration
VDS Version
3.13

RabbitMQ is a lightweight open-source message broker that communicates between the VDS components. You can install RabbitMQ on the web server that hosts VDS or install RabbitMQ on another server that is accessible on the network. RabbitMQ is dependent upon Erlang OTP, which is a collection of useful middlewares, libraries, and tools written in the Erlang programming language.

RabbitMQ creates a service and then opens specific ports, which requires administrator access. Follow the procedures listed below to install and configure RabbitMQ. All procedures require administrative privileges. Use the Run as Administrator option for the installation of Erlang OTP, RabbitMQ, and the RabbitMQ plugin.

Version Information

  • RabbitMQ 3.7 and later

  • Erlang - Install the version of Erlang that is compatible with the version of RabbitMQ you installed.

    If the Erlang and RabbitMQ versions are not compatible, RabbitMQ does not work. Check the Rabbit/Erlang compatibility matrix on the RabbitMQ website.

    • Hexagon recommends that you install RabbitMQ using the default values.

    • Hexagon recommends that you install the rabbitmq_management plugin for easily editing the RabbitMQ configuration.

    • RabbitMQ and Erlang are required for the VDS message queue service.

Hexagon recommends that you install Erlang using the default values.

If you are going to access the RabbitMQ service across a network, you must allow access to port 5672, used for RabbitMQ communication through the firewall. For a Windows firewall, this means creating an Inbound Rule for a port with TCP communication. Enter this port number in the VDS Configuration Utility Broker Settings. Additionally, if you configure RabbitMQ through the RabbitMQ Management site (recommended), you must also allow access to port 15672.

Install Erlang OTP

  1. Download the 64-bit install for the required version. Downloads are available from https://www.erlang.org/downloads.

  2. Start the installation, and on the Choose Components page, select all the components, and then click Next.

  3. Specify the installation destination folder, and then click Next.

  4. Specify the Start menu folder name, and then click Install.

Install RabbitMQ

  1. Download the install for the required version. For help, see Downloading and Installing RabbitMQ on the RabbitMQ website.

  2. Start the installation, and on the Choose Components page, select all the components, and then click Next.

  3. Specify the installation destination folder, and then click Install. The default is c:\Program Files\RabbitMQ Server.

  4. Click Next, and then click Finish.

Create a RabbitMQ username and password

You must create a new RabbitMQ username and password using either the command line tool or by using the RabbitMQ Management site (http://localhost:15672) in a browser. To use the RabbitMQ Management site, you must install the RabbitMQ Management Plugin. To install the plug-in:

  1. Go to the sbin subfolder where RabbitMQ is installed.

  2. Execute: $ rabbitmq-plugins enable rabbitmq_management

  3. Access the management site at: http://localhost:15672

This command might fail due to a known problem with RabbitMQ. Verify that the contents of c:\windows\.erlang.cookie and %HOMEDRIVE%%HOMEPATH%\.erlang.cookie are the same. (If the %HOMEDRIVE% variable is not defined, then the %HOMEPATH%\.erlang.cookie.) If not, overwrite one file with the other. See https://www.rabbitmq.com/install-windows-manual.html for more information.

The first-time login username for the plugin is "guest" with a password of "guest". You must create a new user who can access virtual hosts as the "guest" username. The guest account can only be used when accessing RabbitMQ through localhost. See http://www.rabbitmq.com/management.html for more information. For security reasons, consider removing the guest user after you create your new username.

Configure RabbitMQ service to run using Admin account

  1. Open Control Panel > System and Security > Administrative Tools > Services.

  2. Right-click the RabbitMQ service, and then select Properties.

  3. Select the Log on tab.

  4. Select This account and enter the admin user account credentials for the service to use.

  5. Click Apply.

  6. Select the General tab.

  7. Verify that Startup type is set to Automatic.

  8. Click Start, and then click OK.

If both the variables %HOMEDRIVE% and %HOMEPATH% are defined, the specified administration account user must have write-access permission to the %HOMEDRIVE%%HOMEPATH% location.

Configure SSL for RabbitMQ

Although not required, you can add SSL to RabbitMQ communication for additional security. You need an authority certificate, a server certificate, and a server certificate key to enable SSL.

Even though you are using a Windows version of RabbitMQ, it still requires certificates in PEM format, which is used in non-Windows environments.

  1. Create a RabbitMQ configuration file if you do not already have one. The default location is %AppData%/RabbitMQ/rabbitmq.config.

  2. Add these configuration entries to the configuration file and modify the text in bold with your local paths.

    {rabbit,

    [{ssl_listeners, [5671]},

    {ssl_options,

    [{cacertfile,"<Path to CA cert in PEM format>"},

    {certfile,"<Path to server certificate in PEM format>"},

    {keyfile,"<Path to server cert key in PEM format>"},

    {verify,verify_none},

    {fail_if_no_peer_cert,false}

    ]},

    ]}

    Backslashes ("\") in the configuration file are interpreted as escape sequences. Therefore, to specify the path c:\cacert.pem for the CA certificate, use "c:\\cacert.pem" or "c:/cacert.pem".

  3. Open the SSL port in the firewall. By default, the RabbitMQ SSL port is 5671 and the non-SSL port is 5672.

  4. Add certificate authority to your Windows Trusted Root Certification Authorities list. The RabbitMQ connection test fails if the CA certificate is not part of your trusted list. While adding CA cert to your trusted list, make sure that you use certificates with .crt or .psfx formats because Windows does not accept PEM format.

  5. After you complete these changes, stop, remove, and install the RabbitMQ service using these commands. Open a command line window as administrator and type:

    1. C:/> cd <RabbitMQ install dir>\sbin

    2. C:/> rabbitmq-service stop

      Stops RabbitMQ service.

    3. C:/> rabbitmq-service remove

      Removes RabbitMQ service.

    4. C:/> rabbitmq-service install

      Installs RabbitMQ service.

  6. To verify that the installation is successful and the service is running, open the Windows Services component and ensure that the RabbitMQ service is started.

Install the RabbitMQ Management Plugin

Perform the steps below one time for your implementation. If you have already performed this procedure, continue to setting up the VDS Web Server.

  1. Open the RabbitMQ Management Plugin. If you used the installation default settings, this utility can be accessed by navigating your browser to the URL http://localhost:15672.

  2. Create a virtual host and enter a user name and password for services to use, if you have not already done so. This user must have the administrator tag, and they must have permission to access the virtual host.

    For details on how to use the RabbitMQ Management Plug-in, see the RabbitMQ documentation.