Setting Up RabbitMQ on Windows

When installing RabbitMQ on a Windows Server, particularly version 2.8.6, you may encounter issues related to the Erlang installation. This guide will help you resolve common configuration problems.

Installation Steps

  1. Install Erlang: Ensure you have a compatible 64-bit version of Erlang installed. The default installation path is typically C:\Program Files\erl5.9.2.

  2. Set Environment Variables: After installing Erlang, you need to set the ERLANG_HOME environment variable. This variable should point to your Erlang installation directory. Here’s how to do it:

    • Go to Control Panel > System > Advanced system settings > Environment Variables.
    • Under System variables, click New and enter the following:
      • Variable name: ERLANG_HOME
      • Variable value: C:\Program Files\erl5.9.2 (or your specific path)
    • Additionally, add %ERLANG_HOME%\bin to the Path variable to ensure the Erlang executables are accessible from the command line.
  3. Starting RabbitMQ: To start RabbitMQ, run the rabbitmq-service.bat script. If you encounter an error stating:

    Please either set ERLANG_HOME to point to your Erlang installation 
    or place the RabbitMQ server distribution in the Erlang lib folder.

    This indicates that the script is not correctly recognizing the ERLANG_HOME variable. This issue may arise due to the presence of a new subdirectory in Erlang installations, such as erts-5.9.2.

Troubleshooting

If RabbitMQ fails to start, ensure that:

  • The ERLANG_HOME variable is correctly set and points to the right directory.
  • The RabbitMQ batch files are compatible with your version of Erlang. If necessary, consult the official RabbitMQ documentation for updates or changes in the installation process.

By following these steps, you should be able to successfully configure RabbitMQ on your Windows server without encountering the common pitfalls associated with Erlang setup.