DEV Community

Pavithran M
Pavithran M

Posted on

RabbitMQ Installation on Windows: A Complete Setup & Troubleshooting Guide

A real-world RabbitMQ installation journey on Windows—from installation to debugging Erlang compatibility, Windows services, management plugins, and startup failures.


Introduction

RabbitMQ is one of the most popular open-source message brokers used for asynchronous communication between applications. Whether you're building microservices, event-driven systems, or background processing applications, RabbitMQ provides a reliable messaging infrastructure.

Installing RabbitMQ on Windows appears straightforward:

  • Install Erlang
  • Install RabbitMQ
  • Enable the management plugin
  • Start the service

However, in practice, installation can quickly become complicated due to:

  • Erlang version mismatches
  • Incorrect environment variables
  • Windows service configuration
  • Plugin issues
  • Startup failures

This article documents the complete installation process along with the real troubleshooting steps required to get RabbitMQ running successfully.


Prerequisites

Before installing RabbitMQ, ensure you have:

  • Windows 10/11
  • Administrator privileges
  • Internet connection
  • Latest compatible Erlang OTP
  • RabbitMQ Installer

Step 1 — Install Erlang OTP

RabbitMQ depends on Erlang Runtime.

Install Erlang OTP from the official website.

After installation verify it.

erl
Enter fullscreen mode Exit fullscreen mode

Expected output:

Erlang/OTP ...

Eshell V...
1>
Enter fullscreen mode Exit fullscreen mode

If the command immediately returns to the command prompt, Erlang is not configured correctly.

Exit Erlang using:

q().
Enter fullscreen mode Exit fullscreen mode

Step 2 — Configure Environment Variables

Create an environment variable.

ERLANG_HOME
Enter fullscreen mode Exit fullscreen mode

Value

C:\Program Files\Erlang OTP
Enter fullscreen mode Exit fullscreen mode

Also verify the PATH contains

C:\Program Files\Erlang OTP\bin
Enter fullscreen mode Exit fullscreen mode

Verification:

echo %ERLANG_HOME%

where erl
Enter fullscreen mode Exit fullscreen mode

Step 3 — Install RabbitMQ

Install RabbitMQ Server.

After installation verify the service.

sc query RabbitMQ
Enter fullscreen mode Exit fullscreen mode

Expected

SERVICE_NAME: RabbitMQ
Enter fullscreen mode Exit fullscreen mode

Step 4 — Enable RabbitMQ Management Plugin

Navigate to RabbitMQ sbin.

cd "C:\Program Files\RabbitMQ Server\rabbitmq_server-4.3.4\sbin"
Enter fullscreen mode Exit fullscreen mode

Enable Management UI.

rabbitmq-plugins enable rabbitmq_management
Enter fullscreen mode Exit fullscreen mode

Expected output

Enabling plugins on node rabbit@hostname...

rabbitmq_management
rabbitmq_management_agent
rabbitmq_web_dispatch

started 3 plugins
Enter fullscreen mode Exit fullscreen mode

Step 5 — Restart RabbitMQ

net stop RabbitMQ

net start RabbitMQ
Enter fullscreen mode Exit fullscreen mode

Or restart from

services.msc
Enter fullscreen mode Exit fullscreen mode

Step 6 — Verify Installation

Open

http://localhost:15672
Enter fullscreen mode Exit fullscreen mode

Default Login

Username : guest
Password : guest
Enter fullscreen mode Exit fullscreen mode

RabbitMQ Default Ports

Service Port
AMQP 5672
Management UI 15672
Erlang Distribution 25672

Real Troubleshooting Journey

This section documents every issue encountered during installation.


Problem 1

rabbitmq-plugins produced no output

Running

rabbitmq-plugins enable rabbitmq_management
Enter fullscreen mode Exit fullscreen mode

returned immediately.

No output.

No error.

Normally RabbitMQ should display

started 3 plugins
Enter fullscreen mode Exit fullscreen mode

Investigation

Checked

rabbitmq-plugins list
Enter fullscreen mode Exit fullscreen mode

No output.

Checked

rabbitmqctl status
Enter fullscreen mode Exit fullscreen mode

No output.

This indicated RabbitMQ tools were unable to communicate with Erlang.


Problem 2

Erlang immediately exited

Running

erl
Enter fullscreen mode Exit fullscreen mode

returned directly to the command prompt.

Instead of

Eshell...
Enter fullscreen mode Exit fullscreen mode

This confirmed Erlang itself wasn't functioning properly.


Problem 3

RabbitMQ Service Error 1067

Checking the service

sc query RabbitMQ
Enter fullscreen mode Exit fullscreen mode

Result

STATE : STOPPED

WIN32_EXIT_CODE : 1067
Enter fullscreen mode Exit fullscreen mode

Meaning

RabbitMQ started and terminated unexpectedly.


Problem 4

RabbitMQ Boot Failed

Instead of using the Windows service, RabbitMQ was started manually.

rabbitmq-server.bat
Enter fullscreen mode Exit fullscreen mode

Output

BOOT FAILED

throw:{horus, extraction_denied,...}
Enter fullscreen mode Exit fullscreen mode

Initially it appeared to be a configuration issue.


Problem 5

Configuration File

RabbitMQ loaded

advanced.config
Enter fullscreen mode Exit fullscreen mode

The configuration file was renamed.

RabbitMQ still failed.

Therefore configuration wasn't the root cause.


Problem 6

Windows Service Error

Running

net start RabbitMQ
Enter fullscreen mode Exit fullscreen mode

returned

System error 2

The system cannot find the file specified.
Enter fullscreen mode Exit fullscreen mode

This was confusing because the RabbitMQ service already existed.


Root Cause Investigation

Instead of checking RabbitMQ logs repeatedly, the Windows service configuration was inspected.

sc qc RabbitMQ
Enter fullscreen mode Exit fullscreen mode

Output

BINARY_PATH_NAME

C:\Program Files\Erlang OTP\erts-17.0.4\bin\erlsrv.exe
Enter fullscreen mode Exit fullscreen mode

However, the installed Erlang version contained

erts-16.4
Enter fullscreen mode Exit fullscreen mode

RabbitMQ was still pointing to the old Erlang runtime.

Windows therefore attempted to launch

erts-17.0.4
Enter fullscreen mode Exit fullscreen mode

which no longer existed.

Hence

System error 2
Enter fullscreen mode Exit fullscreen mode

Solution

Remove the existing RabbitMQ service.

rabbitmq-service.bat remove
Enter fullscreen mode Exit fullscreen mode

Verify

echo %ERLANG_HOME%
Enter fullscreen mode Exit fullscreen mode

Install the service again.

rabbitmq-service.bat install
Enter fullscreen mode Exit fullscreen mode

Start RabbitMQ.

rabbitmq-service.bat start
Enter fullscreen mode Exit fullscreen mode

Verify the service configuration.

sc qc RabbitMQ
Enter fullscreen mode Exit fullscreen mode

RabbitMQ should now reference the current Erlang runtime.


Useful Commands

Verify Erlang

erl
Enter fullscreen mode Exit fullscreen mode

Verify Environment Variable

echo %ERLANG_HOME%
Enter fullscreen mode Exit fullscreen mode

Check Erlang Path

where erl
Enter fullscreen mode Exit fullscreen mode

RabbitMQ Status

rabbitmqctl status
Enter fullscreen mode Exit fullscreen mode

RabbitMQ Service Status

sc query RabbitMQ
Enter fullscreen mode Exit fullscreen mode

RabbitMQ Service Configuration

sc qc RabbitMQ
Enter fullscreen mode Exit fullscreen mode

Start RabbitMQ

net start RabbitMQ
Enter fullscreen mode Exit fullscreen mode

Stop RabbitMQ

net stop RabbitMQ
Enter fullscreen mode Exit fullscreen mode

Restart RabbitMQ

net stop RabbitMQ

net start RabbitMQ
Enter fullscreen mode Exit fullscreen mode

Start RabbitMQ in Foreground

rabbitmq-server.bat
Enter fullscreen mode Exit fullscreen mode

Enable Management Plugin

rabbitmq-plugins enable rabbitmq_management
Enter fullscreen mode Exit fullscreen mode

List Enabled Plugins

rabbitmq-plugins list -E
Enter fullscreen mode Exit fullscreen mode

Lessons Learned

There were several important takeaways from this debugging session.

Always verify Erlang first

Before installing RabbitMQ, ensure

erl
Enter fullscreen mode Exit fullscreen mode

opens the Erlang shell.


Verify Environment Variables

Incorrect

ERLANG_HOME
Enter fullscreen mode Exit fullscreen mode

or PATH configuration causes multiple RabbitMQ issues.


RabbitMQ Depends on Erlang Runtime

Reinstalling Erlang changes the runtime directory.

RabbitMQ Windows Service still references the previous runtime until the service is recreated.


Windows Service Errors Can Be Misleading

System error 2
Enter fullscreen mode Exit fullscreen mode

did not mean RabbitMQ was missing.

It meant the service executable path referenced a missing Erlang runtime.


Use rabbitmq-server.bat

Instead of relying on Windows Service errors.

rabbitmq-server.bat
Enter fullscreen mode Exit fullscreen mode

provides detailed startup diagnostics.


Always Verify Service Configuration

The most useful command during this debugging session was

sc qc RabbitMQ
Enter fullscreen mode Exit fullscreen mode

It immediately exposed the incorrect Erlang runtime path.


Final Thoughts

RabbitMQ installation is usually straightforward, but Windows service configuration and Erlang compatibility can introduce subtle issues that are difficult to diagnose.

The key takeaway from this experience is to troubleshoot methodically:

  1. Verify Erlang.
  2. Verify environment variables.
  3. Check RabbitMQ startup.
  4. Inspect Windows service configuration.
  5. Recreate the RabbitMQ service after changing Erlang versions.
  6. Enable the management plugin only after the server starts successfully.

Following this process made it possible to move from repeated startup failures to a fully working RabbitMQ installation with the Management UI enabled.


If this guide helped you save hours of debugging, consider sharing it with other developers who are setting up RabbitMQ on Windows. It might save them from the same troubleshooting journey.

Top comments (0)