Windows x64 RabbitMQ install error with Erlang environment var (ERLANG_HOME)

I had the similar issue, modifying ERLANG_HOME in .bat files did not work. Then I tried echo %ERLANG_HOME% in command prompt, that did not print the environment variable value(I could see that ERLANG_HOME environment variable has been created under advance system settings), that lead me to believe that I need to restart server for 64 bit installation of Erlang. After rebooting server, It worked like a charm. I hope this helps someone.


There are several RabbitMQ control .bat files on windows. Every one you use needs to get changed to reflect the Erlang path correctly. In this example, I'm editing the rabbitmq-server.bat because it's one of the easier ones... any of the .bat files you want to run will need this hack to get them to work, with the rabbitmq_service.bat file being the most involved to adjust.

editing that rabbitmq_server.bat file, you can see on about line 48 or so there's a check to see if the erl.exe is found, but the path isn't correct:

if not exist "!ERLANG_HOME!\bin\erl.exe" (

that path does not match the file structure for the 5.9.2 version of Erlang. I fixed this by simply removing this path check from about line 48 to 58, then, where the .bat actually makes a call to the erl.exe on about line 129 which reads:

"!ERLANG_HOME!\bin\erl.exe" 

I simply hardcoded the path to my erl.exe:

"C:\Program Files\erl5.9.2\erts-5.9.2\bin\erl.exe" 

With the pathing correct, the rabbitmq .bat files will run.


Just to share an up-to-date answer as of 2019: On Windows Server 2019, after setting up the environment variable, a restart is required to solve the problem.


1- Set environment variable:

Variable name : ERLANG_HOME
Variable value: C:\Program Files (x86)\erl6.4

note: don't include bin on above step.

2- Add %ERLANG_HOME%\bin to the PATH environmental variable:

Variable name : PATH
Variable value: %ERLANG_HOME%\bin

This works well.