[rabbitmq-discuss] Installation Trouble on Windows - "The handle is invalid"

Emile Joubert emile at rabbitmq.com
Wed Jul 27 11:15:45 BST 2011

Hi Christopher,

On 27/07/11 01:16, Christopher Moloney wrote:

> Here is a summary of what I have done thus far. First I installed erlang
> 5.8.4 and rabbitmq 2.5.1 and followed the procedure on the windows
> install page. Everything seemed to go well, however when I tried to run
> the server it continually returned node down. In the hello world example

Could you tell by using the troubleshooting tips at
whether the broker was running at this point?
Was the "nodedown" a result of running the rabbitmqctl script?
Were the .erlang.cookies matching at this time?

> using pika I got the message that the connection was actively refused by
> the machine. So first I checked my firewall to make sure port 5672 was
> open. Then, I made sure my C:/Windows .erlang.cookie matched the on in
> my user directory.
> Starting the server I would get a boot error that was not very
> descriptive: error, badmatch error.

What command preceded this error, and was there any additional
information following the error?

> So I decided to try to uninstall and run the prepackaged windows
> binaries. Well then there was a windows service error mismatch because I
> had installed erlang 5.8.4 and the windows binaries used 5.8.3.  The

This is not a problem. You must set the %ERLANG_HOME% variable in any
case. Also see the rabbitmq-service documentation at

> windows service was point to the wrong directory. Service.msc does not
> allow you to edit the path. I used the SC DELETE command at the terminal
> to remove the RabbitMQ service imaging that a fresh install would
> replace the service value with the correct location.

It is possible to modify the service parameters by installing the
service again, as explained in the rabbitmq-service documentation:

> Since then I have not been able to add the service back. When I attempt
> to run ‘rabbitmq-service install’ get the message: Warning, could not
> set correct service description (comment) Error: The handle is invalid.

I would recommend using the "rabbitmq-service.bat remove" command to
remove the service. See the documentation:

Running "SC DELETE" may have caused problems. There are additional
registry keys that need to be removed if you want to completely remove
the service. On my workstation they are under

You must use the rabbitmq-service.bat (or the Erlang Service Manager
directly) to modify services. If these fail then you may need to remove
the registry keys manually. Needless to say, this is not standard
operating procedure and you risk even more serious problem if you make a
mistake. Take a backup first.

> The same message comes up when I run any of the commands. I have tried
> to wipe all traces of erlang and rabbit from my machine to start again,
> but it has not been possible. I would really like to resolve this matter
> and get the messaging server up and running.
> Any suggestions? I appreciate any assistance.

Clean up the registry and make sure you install and remove the service
using the rabbitmq-service.bat script. Your experience suggests that we
could add more troubleshooting tips. Please let us know if you wish to
suggest some.


More information about the rabbitmq-discuss mailing list