Cannot restart RabbitMQ Service on Windows

portrabbitmqwindows-service

I stopped RabbitMQ for a short time on my Windows (2012) server. However, when I tried to restart it, it would shut down again within about 30 seconds.

The Windows Event Log had the following message:

RabbitMQ: Erlang machine voluntarily stopped. The service is not restarted as OnFail is set to ignore.

The RabbitMQ error log had the following message:

=ERROR REPORT==== 12-Aug-2013::13:16:59 ===
** Generic server rabbit_web_dispatch_registry terminating 
** Last message in was {add,rabbit_mgmt,
                            [{port,15672}],
                            #Fun<rabbit_web_dispatch.1.31447083>,
                            #Fun<rabbit_mgmt_app.2.5043001>,
                            {[],"RabbitMQ Management"}}
** When Server state == undefined
** Reason for termination == 
** {could_not_start_listener,[{port,15672}],eaddrinuse}

However, I know that there is very little running on the machine, and nothing else should be trying to bind to that port.

What could be causing this?

Best Answer

If you reinstall RabbitMQ and have issues running it as a windows service, a workaround could be the following:

In cmd.exe, run from the rabbit sbin folder:

rabbitmq-service.bat remove
rabbitmq-service.bat install
net start rabbitmq

It worked for me on windows 7.