0
votes

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)

2
So, the service you started seems to be related to Window's airplane mode more information here. This might explain the connection problems. Were you able to stop it in the meantime? - José Belo
Radio Management Service is stopped and on manual after PC restart. Shouldn't this be the default? Thank you José. - Sami
According to this, yes it should. Can you access RabbitMQ now? - José Belo
Well, this post here has lots of suggestions besides the one you tried. Might it be that you have multiple files .erlang.cookie in your computer? - José Belo
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

2 Answers

3
votes

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.

2
votes

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