Rabbitmq-server: Windows installer for 3.6.0 and 3.6.1 RC1 fails to correctly install the Windows service

Created on 15 Feb 2016  路  16Comments  路  Source: rabbitmq/rabbitmq-server

With Windows Server 2008 R2, both installers create a HKEY_LOCAL_MACHINE\SOFTWARE\Ericsson\Erlang\ErlSrv\1.1\RabbitMQ key with Args and Env values missing all data. The service starts but does nothing.

The solution is to start a RabbitMQ Command Prompt and remove then install the service after installation.

bug pkg-windows

Most helpful comment

For the benefit of future visitors, I got hit by the same issue while trying to run any script from the sbin directory after installing RabbitMQ 3.6.1.
The issue in my case was that my HOMEDRIVE and HOMESHARE environment variables were set to a network drive and Rabbit Server didn't like this. It kept on telling me that it failed to write the Erlang cookie to H: (which was mapped to the network drive and set as my HOMEDRIVE)

Resolution: Set your HOMEDRIVE to a local drive
set HOMEDRIVE=C:
set HOMESHARE=C:\users

After this, run the RabbitMQ installer and things should be fine!
This may be helpful to set these options at startup: http://superuser.com/questions/246731/how-do-i-change-homedrive-homepath-and-homeshare-in-windows-xp

All 16 comments

Hi @jcasale
Thank you for reporting.

I retried the Windows installer 3.6.1 RC1 on Windows 7, just to be sure, and it works correctly:

reg_windows_7

I'm going to try with Windows 2008 R2.

@Gsantomaggio you can also check installation when epmd is not running.

@hairyhum Yes, thank you! I will.

Ok I have the same problem.

I noticed that there is and error during the setup :
error

I think that the installation didn't finish correctly and the registry is not correct:
reg_error

I stopped the service and put it as manual and I restarted the machine.

I got the same error using rabbitmq-server.bat as:

C:\Program Files\RabbitMQ Server\rabbitmq_server-3.6.0.901\sbin>rabbitmq-server.
bat
The filename, directory name, or volume label syntax is incorrect.
The filename, directory name, or volume label syntax is incorrect.
The filename, directory name, or volume label syntax is incorrect.
ERROR: epmd error for host Protocol: inet_tcp: register/listen error: econnrefus
ed: nxdomain (non-existing domain)

NOTE: This error appears only the first execution, I retried to execute rabbitmq-server.bat it worked:

C:\Program Files\RabbitMQ Server\rabbitmq_server-3.6.0.901\sbin>rabbitmq-server.
bat

              RabbitMQ 3.6.0.901. Copyright (C) 2007-2016 Pivotal Software, Inc.

  ##  ##      Licensed under the MPL.  See http://www.rabbitmq.com/
  ##  ##
  ##########  Logs: C:/Users/ADMINI~1/AppData/Roaming/RabbitMQ/log/RABBIT~1.LOG
  ######  ##        C:/Users/ADMINI~1/AppData/Roaming/RabbitMQ/log/RABBIT~2.LOG
  ##########
              Starting broker... completed with 0 plugins.

At this point I tried to uninstall RabbitMQ service re-install it again without reboot the machine and the setup worked correctly:
screen shot 2016-02-16 at 18 11 23

also the TCP listener is up:

C:\Program Files\RabbitMQ Server\rabbitmq_server-3.6.0.901\sbin>netstat -na | find "5672"
  TCP    0.0.0.0:5672           0.0.0.0:0              LISTENING
  TCP    0.0.0.0:25672          0.0.0.0:0              LISTENING

basically I think that we have two issues:

  1. ERROR: epmd error for host Protocol only to the first boot.
  2. The setup should stop if there is an error

Looks like the same error I had when trying to install 3.7.x with epmd not running (e.g. after reboot).
@Gsantomaggio you can try fixes from commits I mentioned above.

Yes @hairyhum the error is when epmd.exe is not running. Thanks.

Using https://github.com/rabbitmq/rabbitmq-server/commit/0f5111cab23e900ccc6794b53f220de594a11c80 it works.
I tested it using rabbitmq-service.bat and rabbitmq-server.bat

We believe this is fixed in #631. We will produce a build for users to help verify.

@Gsantomaggio I saw the same error in the output window while installing RC1 however the window disappears before you can copy any of it. It might be good to fail the installation if any of the steps return invalid exit codes. In this case, the installation reports success even though you can fix it afterwords it is misleading.

@michaelklishin Once I see a new build, I will give it a spin.

Thanks everyone.

@jcasale thanks, I'm attaching a build which includes #631. Please give it a try.

rabbitmq-server-3.6.0.625.exe.zip

@michaelklishin just tried and it works correctly.
Before close I'd wait also @jcasale feedback.

I can confirm for the following cases with Erlang 18.2.1 x64 and rabbitmq-server-3.6.0.625 with Windows Server 2008 R2:

  • Installation in the default locations when SystemDrive=C: works, the service installs and starts correctly.
  • Installation in an alternate drive and path such as the original user who had the problem at [https://groups.google.com/forum/#!topic/rabbitmq-users/Wa_4TJ8ozxE] works, the service installs and starts correctly.

Thanks.

For the benefit of future visitors, I got hit by the same issue while trying to run any script from the sbin directory after installing RabbitMQ 3.6.1.
The issue in my case was that my HOMEDRIVE and HOMESHARE environment variables were set to a network drive and Rabbit Server didn't like this. It kept on telling me that it failed to write the Erlang cookie to H: (which was mapped to the network drive and set as my HOMEDRIVE)

Resolution: Set your HOMEDRIVE to a local drive
set HOMEDRIVE=C:
set HOMESHARE=C:\users

After this, run the RabbitMQ installer and things should be fine!
This may be helpful to set these options at startup: http://superuser.com/questions/246731/how-do-i-change-homedrive-homepath-and-homeshare-in-windows-xp

I had the same issue. I was able to use the fix provided by @mishrsud successfully.

Alternative solution pulled from various sources for me was to patch the rabbitmq-env to pull the cookie from the network drive. Can't comment on whether this is ideal or works in all scenarios, but it's proven more robust for me, and doesn't require changing the home directory. Patch in gist:

https://gist.github.com/tr00st/c4609ca35121253dd0a6b25921c23417

Was this page helpful?
0 / 5 - 0 ratings