RabbitMQ not starting on windows 10 anymore - rabbitmq

I am using RabbitMQ to work with Django and Celery on Windows 10.
I have installed RabbitMQ Server 3.8.5 and Erlang OTP 23.
RabbitMQ works when I installed it yesterday, and I managed to configure some tasks with Celery using it.
I could use it earlier in the day, however after a restart, I realised rabbitMQ server won't start anymore. When I try to start the service in services, it shows:
A system error has occurred.
System error 1067 has occurred.
The process terminated unexpectedly.
I checked the logs, and it shows:
{"init terminating in do_boot",{error,{compiler,{"no such file or directory","compiler.app"}}}}
init terminating in do_boot ({error,{compiler,{no such file or directory,compiler.app}}})
trying to run rabbitmq-plugins.bat enable rabbitmq_management gives:
Failed to start Elixir.
error: {error,{compiler,{"no such file or directory","compiler.app"}}}
Does anyone know what happened? It could work previously and all of a sudden it just doesn't work anymore...

Related

Why can I not start RabbitMQ service 3.8.7 on Windows 10

I'm trying to run RabbitMQ 3.8.7 on Windows 10 and the service will not start
Versions
Rabbit MQ 3.8.7
Erlang 23.0 Win 64
Windows 10 Version 21H2
When I try to start the RabbitMQ service through services.msc the status changes to running and when I refresh the status is empty.
From an admin Powershell command line I've tried
rabbitmq-server.bat Nothing happens. No error message.
.\rabbitmq-diagnostics.bat -q ping Error: Failed to connect and authenticate to rabbit#mycomputer in 60000 ms
Looking for log files in C:\Users\user.name\AppData\Roaming\RabbitMQ\log There are no log files
I tried this answer with no success
When installing newer versions of RabbitMQ, e.g. 3.9.7 or 3.10.5 then I do not have these problems. But our server uses 3.8.7 and I need to test locally how to upgrade from 3.8.7 to 3.10.5.
Why can I not start RabbitMQ 3.8.7 on Windows 10?

Cannot start rabbitmq management plugin

I have installed rabbitmq on a windows server and am trying to enable the rabbitmq_management plugin but an error occurs which can be seen below. Please help me to solve this issue
rabbitmq error

Init terminating in boot error while starting a rabbitmq (3.7.3) server on CentOS 7 using rabbitfixture

I have installed RabbitMQ 3.7.3 and Erlang/OTP 20.0 and running my unittests against it using rabbitfixture but when rabbitfixture starting RabbitMQ server it giving me the below error.
"init terminating in di_boot", {undef, [{rabbit_nodes_common,make,["tmppIN_su#localhost"].[]},{rabbit_prelaunch,start,0,[{file,"src/rabbit_prelaunch.erl"},{line,41}]},{init,start_em,1,[]},{init,do_boot,3,[]}]}}
Pardon me for less information but that is all I got in the log file. Is there something I can change or fix?
Here's the line of code raising the error: link.
Notice that it is trying to call rabbit_nodes:make/1 but your output indicates a call to rabbit_nodes_common:make/1. This means that you have upgraded from a previous version of RabbitMQ and there is an old code file around, or there is some other odd issue in your environment.
I recommend starting from a fresh VM or at least removing RabbitMQ and ensuring that all installed files are removed before re-installing.
Be sure to remove /usr/lib/rabbitmq after un-installation, for instance.
NOTE: the RabbitMQ team monitors the rabbitmq-users mailing list and only sometimes answers questions on StackOverflow.

Error while installing RabbitMQ Service on Windows

I want to install RabbitMQ Service as a Windows Service. I see an option to install RabbitMQ Service from installer (v3.6.5). However, it does not work.
I write a Batch script trying to re-install RabbitMQ service after running installer file.
set HOMEDRIVE=C:
set HOMEPATH=\Users\%username%
call "C:\Program Files\RabbitMQ Server\rabbitmq_server-3.6.5\sbin\rabbitmq-service.bat" remove
call "C:\Program Files\RabbitMQ Server\rabbitmq_server-3.6.5\sbin\rabbitmq-service.bat" install
call net start RabbitMQ
call "C:\Program Files\RabbitMQ Server\rabbitmq_server-3.6.5\sbin\rabbitmq-plugins.bat" enable rabbitmq_management
However, this script is quite unstable.
Sometimes it works, but sometimes it doesn't.
I tested in many PCs with Windows 10, Windows 8.1, Windows 7 and Windows Server 2012.
When error occurs, it always occurs in the last command (enabling RabbitMQ management)
C:\Program Files\erl9.0\erts-9.0\bin\erlsrv: Service RabbitMQ removed from system.
C:\Program Files\erl9.0\erts-9.0\bin\erlsrv: Service RabbitMQ added to system.
The RabbitMQ service is starting.
The RabbitMQ service was started successfully.
Plugin configuration unchanged.
Applying plugin configuration to rabbit#<myhost>... failed.
* Could not contact node rabbit#<myhost>.
Changes will take effect at broker restart.
* Options: --online - fail if broker cannot be contacted.
--offline - do not try to contact broker.
Sometimes, I got this error
...
Plugin configuration unchanged.
Applying plugin configuration to rabbit#<myhost>... failed.
Error: noproc
In my PC, I get the first error (could not contact node...) when %HOMEDRIVE%%HOMEPATH% is C:\users\myusername. When I change to C:\Windows, it works well. Then I change back to C:\users\, it also works well, no more error.
However, on a server with Windows Server 2012, even C:\Windows does not work (could not contact node...).
In all PCs, I see .erlang.cookie file in both C:\Windows and C:\Users[username]. (I don't know anything about erlang, just follow some instructions from other questions in StackOverFlow).
What is wrong with my script?
Is the error related to the version of RabbitMQ? I am not using the latest version.
Is it related to Erlang? I guess if Erlang caused this problem, then two commands about removing/installing RabbitMQ service would be failed.
Is it able to install the service without checking service option from installer, just run command rabbitmq-service.bat install?
The RabbitMQ team monitors this mailing list and only sometimes answers questions on stackoverflow.
You should be using the most recent version of the RabbitMQ installer for Windows, available here. I am assuming that <myhost> in your question is an edited-out hostname, not what is actually being used. You also don't mention which version of Erlang you have installed, but I assume it is a recent one.
You should uninstall RabbitMQ and ensure all traces are removed from C:\Users\myusername (be sure to check %APPDATA%) and C:\Windows. You should not have to change the default values of HOMEDRIVE and HOMEPATH prior to installation. Use an administrative account when running the Erlang and RabbitMQ .exe installers.
Please note that 3.6.12 has this issue on Windows. A workaround is to set vm_memory_calculation_strategy to erlang. I fixed this issue and it will be delivered in 3.6.13.
Thanks for using RabbitMQ!

Can't open RabbitMq after installation on Windows

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)
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.
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
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.
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).