Installing Rabbit MQ - Intergraph Smart 3D Web API - Installation & Upgrade - Hexagon PPM

Intergraph Smart 3D Web API Installation and Configuration

PPMProduct
Intergraph Smart 3D Web API
PPMCategory_custom
Installation & Upgrade
Version_SThreeD_Custom
12 (2018)

RabbitMQ is a lightweight open source message broker that communicates between the Smart 3D Web API components. You can install RabbitMQ on your web server where you plan to host Smart 3D Web API 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 Erlang programming language.

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 Windows firewall, this means creating an Inbound Rule for a port that which TCP communication. You enter this port number in the Smart 3D Web API Configuration Utility later.

Install Erlang OTP

  1. Download the 64-bit install from https://www.erlang.org/downloads. You need version 22.0 or later.

  2. Double-click the download.

  3. On the Choose Components page, select all the components, and then click Next.

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

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

Install RabbitMQ

  1. Download the install from https://rabbitmq.com/install-windows.html. You need version 3.7.17 or later.

  2. Double-click the download.

  3. On the Choose Components page, select all the components, and then click Next.

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

    The application installs.

  5. Click Next, and then click Finish.

Create a RabbitMQ User Name and Password

You must create a new RabbitMQ user name 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 to 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 not, overwrite one file with the other. See https://www.rabbitmq.com/install-windows-manual.html for more information.

The first-time login user name for the plugin is guest with a password of guest. You must create a new user who can access virtual hosts. See http://www.rabbitmq.com/management.html for more information. For security reasons, consider removing the guest user after you create your new user name.

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 define, the specified admin 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 a cert 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 needs 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 config file and modify highlighted text with your local cert 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, you need to 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.

    1. Open a Windows Command line window as administrator and type:

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

    3. C:/> rabbitmq-service stop

      Stops RabbitMQ service.

    4. C:/> rabbitmq-service remove

      Removes RabbitMQ service.

    5. C:/> rabbitmq-service install

      Installs RabbitMQ service.