1

I was receiving this error when accessing http://localhost:15672 with user guest and password guest (default credentials)

undefined: There is no template at js/tmpl/login.ejs undefined

So I restarted the rabbitmq service from services.msc then by mistake started also the Radio Management Service. After doing this, http://localhost:15672/ wouldn't even open. It says:

localhost refused to connect. Search Google for localhost 15672 ERR_CONNECTION_REFUSED

So I stopped "Radio Management Service", tried to open rabbitmq again, same thing: ERR_CONNECTION_REFUSED.

So I uninstalled both Rabbit MQ Server and erlang.

Then downloaded them from the official site and reinstalled them, first the "Erlang for Windows installer 64-bit" and then the "rabbitmq-server-3.6.12.exe".

However, I still get ERR_CONNECTION_REFUSED (when trying to access http://localhost:15672/).

I didn't know what exactly I should allow through firewall so I added all exe files found in C:\Program Files\erl9.0\bin

Restarted RabbitMq from services.msc. Still ERR_CONNECTION_REFUSED.

Am I missing any plugins or something?

Next, I ran the command rabbitmq-plugins enable rabbitmq_management from the RabbitMQ Command Prompt found in C:\Program Files\RabbitMQ Server\rabbitmq_server-3.6.12\sbin, however I got:

C:\Program Files\RabbitMQ Server\rabbitmq_server-3.6.12\sbin>rabbitmq-plugins enable rabbitmq_management Plugin configuration unchanged.

Applying plugin configuration to rabbit@MYPCNAME... failed. * Could not contact node rabbit@MYPCNAME. Changes will take effect at broker restart. * Options: --online - fail if broker cannot be contacted. --offline - do not try to contact broker.

I am at a loss. What else should I try?

*** Later edit:

I also removed and readded the rabbitmq service in case that was related to the core issue at hand:

C:\Program Files\RabbitMQ Server\rabbitmq_server-3.6.12\sbin>rabbitmq-service remove C:\Program Files\erl9.0\erts-9.0\bin\erlsrv: Service RabbitMQ removed from system.

C:\Program Files\RabbitMQ Server\rabbitmq_server-3.6.12\sbin>rabbitmq-service install C:\Program Files\erl9.0\erts-9.0\bin\erlsrv: Service RabbitMQ added to system.

and then reattempted to:

C:\Program Files\RabbitMQ Server\rabbitmq_server-3.6.12\sbin>rabbitmq-plugins enable rabbitmq_management

...with the same error as above. (could not contact node etc)

Sami
  • 393
  • 8
  • 22
  • So, the service you started seems to be related to Window's airplane mode [more information here](https://learn.microsoft.com/en-us/windows-hardware/drivers/hid/airplane-mode-radio-management). This might explain the connection problems. Were you able to stop it in the meantime? – José Belo Sep 19 '17 at 16:32
  • Radio Management Service is stopped and on manual after PC restart. Shouldn't this be the default? Thank you José. – Sami Sep 19 '17 at 16:42
  • According to [this](http://servicedefaults.com/10/rmsvc/), yes it should. Can you access RabbitMQ now? – José Belo Sep 19 '17 at 16:46
  • Not yet unfortunately. Will try it from a second pc too just to see if following the same steps works on another – Sami Sep 19 '17 at 17:20
  • On the second pc the installation worked. So the problem is that on the first pc, this command fails: `rabbitmq-plugins enable rabbitmq_management` with the mentioned error. When I will have access to the first computer I will try this command: `rabbitmq-plugins.bat enable rabbitmq_management --offline` as seen on another thread, not sure of the implications though. Will return with update. https://stackoverflow.com/questions/33601003/rabbitmq-unable-to-start-rabbitmq-management-plugin – Sami Sep 19 '17 at 20:36
  • 2
    Well, this post [here](https://stackoverflow.com/questions/28258392/rabbitmq-has-nodedown-error) has lots of suggestions besides the one you tried. Might it be that you have multiple files `.erlang.cookie` in your computer? – José Belo Sep 19 '17 at 22:27
  • 1
    Thank you, it worked. I copied C:\Windows\.erlang.cookie over C:\Users\yourusername\.erlang.cookie ; then I deleted all folders in c:\Users\xxx\AppData\Roaming\RabbitMQ\db\ (xxx is your username) ; what finally did it was to Run RabbitMQ sbin command prompt as administrator.and type the command "rabbitmq-server restart". Strangely enough, I get this problem on a recurrent basis and applying these steps does the trick. Thanks so much. The solutions were found on the thread you indicated. – Sami Sep 26 '17 at 14:09

4 Answers4

4

You might need to enable rabbit management pluggin. By default it's not enabled. Run the following command: rabbitmq-plugins enable rabbitmq_management

Then restart your service. Should work.

w5l
  • 5,341
  • 1
  • 25
  • 43
Learner
  • 55
  • 5
  • 1
    In case your searching on windows, the command is located in `%ProgramFiles%\RabbitMQ Server\rabbitmq_server-\sbin\rabbitmq-plugins.bat`. – w5l Apr 08 '20 at 15:08
2

In my case, I checked my RabbitMQ service if it was running. I found that it showed running, but as soon I refreshed the Services window, I could see that the service was not started. Restarting would start but immediately stop. I had to reinstall the service.

I ran the following on command prompt (as Administrator) to solve the problem:

  • SET HOMEDRIVE=C:
  • SC delete RabbitMQ
  • REG DELETE "HKEY_LOCAL_MACHINE\SOFTWARE\Ericsson\Erlang\ErlSrv\1.1\RabbitMQ" /f
  • call rabbitmq-service.bat install
  • call rabbitmq-service.bat start
  • call rabbitmq-plugins.bat enable rabbitmq_management
Sri Reddy
  • 6,832
  • 20
  • 70
  • 112
0

I've stumbled on this problem and none of the other answers did not work. In my case, I needed to clear all the cookies and everything worked out smoothly from that point.

MarekK
  • 428
  • 3
  • 12
0

I was upgrading Rabbit and Erlang to resolve the use of outdated jquery.js and initially ran into the issue where the management UI wouldn't load in the browser. But it turned out that the service never actually started the broker (this can be verified by running rabbitmq-server - if that works then the service is the problem).

As noted elsewhere, it is absolutely mandatory to run rabbitmq-plugins enable rabbitmq_management to enable the management UI.

After following Sri Reddy's recommendation a couple times, it boiled down to the fact that I had to delete my existing .erlang.cookie, then SET HOMEDRIVE=C: and (re)install the service in the same command session/scope.

Our company uses a networked home drive of H: so the cookie failed to install and the service (quietly) failed to run the broker (despite saying it was started and running).