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

21,098

Solution 1

The problem was solved by restarting the Linux server as rabbitMQ commands were hanging and required force stop.

Hope this helps someone.

Solution 2

I had the same symptoms on my Windows server running RabbitMQ after shutting down the RabbitMQ service, and it refused to start back up.

Steps I took to resolve the issue without a reboot:

  1. The RabbitMQ log file named rabbit@[SERVER_NAME_HERE].log at folder C:\Users\[ADMIN_ACCOUNT_USERNAME_HERE]\AppData\Roaming\RabbitMQ\log file was huge (12+ GB); I renamed it so that RabbitMQ could create a new log file.
  2. I tried again to start the RabbitMQ service in services.msc, which failed (again).
  3. The new rabbit@[SERVER_NAME_HERE].log file reported that a particular folder could not be deleted:

cannot_delete, "c:/Users/[ADMIN_ACCOUNT_USERNAME_HERE]/AppData/Roaming/RabbitMQ/db/rabbit@[SERVER_NAME_HERE]-plugins-expand/rabbitmq_management-3.3.5/priv/www/cli",

  1. I tried to rename that cli folder in Windows Explorer and got a "That folder is in use by another process" error.
  2. I downloaded the Sysinternals Handle.exe utility and ran it with an argument of "RabbitMQ", which showed that the folder (cli) that the log file reported couldn't be deleted was being locked by a rundll32.exe process with a particular process ID.
  3. I killed that rundll32.exe instance in Task Manager (after turning on display of Process IDs on the View menu).
  4. I started the RabbitMQ service again, and this time, it worked!

tl;dr

A particular Windows process was locking a folder that RabbitMQ wanted to delete as a part of its startup process. Identifying that process using the Sysinternals Handle utility and then killing it allowed RabbitMQ to start up successfully.

Solution 3

If you are using VPN (working from home) remember to check if the VPN connection is still active. It might just be that you need to reconnect to the network to reach the server.

Solution 4

you can:

docker exec -it rabbitmq
rabbitmq-plugins enable rabbitmq_management

Solution 5

The above comment from Emran helped me realise that I need to stop docker and rebuild the containers.

docker-compose stop
Share:
21,098

Related videos on Youtube

Emran
Author by

Emran

Updated on January 20, 2022

Comments

  • Emran
    Emran over 2 years

    All of a sudden when I try to access RabbitMQ it only displays this on screen:

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

    Any help will be appreciated.

    UPDATE:

    Now it is showing browser default error: Connection Refused

    • Paul
      Paul over 8 years
      So is this Classic ASP or ASP.NET? Have you tried looking to see if the requested file exists?
    • Emran
      Emran over 8 years
      It is ASP .NET MVC, it is installed on command line linux and I am not good with command line. I haven't touched the server in a month so why would the file disappear?
    • Paul
      Paul over 8 years
      Why would the file disappear? Who knows, but that's the start for where you should be looking, based on the error message provided.
    • Emran
      Emran over 8 years
      now it is showing default browser error: connection refused
    • Gabriele Santomaggio
      Gabriele Santomaggio over 8 years
      Which RabbitMQ version ? are you using guest guest as credentials?
    • Emran
      Emran over 8 years
      I am using v 3.3.5. I am not using any credentials as it does not load the login page. As soon as I go to the server. It either shows Connection Refused as default browser error or it shows undefined: There is no template at js/tmpl/login.ejs. When I check Firefox console it says /js/tmpl/login.ejs?0.7230313879240866 1.99s and Error: 404 Not Found get I have just checked the directory on linux server and the login.ejs is available
    • Emran
      Emran over 8 years
      Above the 404 Error, it shows this runRoute get Another point which might help you understand the problem. On windows server's website log file shows: server:5672 unavailable. Error: No connection could be made because the target machine actively refused it.
  • Rakesh Shekhawat
    Rakesh Shekhawat about 7 years
    had the same issue, node was down. deletd node from /var/lib/mnesia dir and started the rabbitmq worked for me
  • maciek
    maciek about 5 years
    I was running RabbitMQ locally, restarting my Mac helped.
  • muad-dweeb
    muad-dweeb almost 3 years
    This did not work for me. Running RabbitMQ in Docker. Restarted my entire laptop. Error persists.