Windows could not start the RabbitMQ Service on local Computer

和自甴很熟 提交于 2020-08-22 09:41:52

问题


I am trying to start RabbitMQ service on my local Windows laptop but I keep getting this error:

I first downloaded erlang (OTP 19.0 Windows 64-bit Binary File) from here: http://www.erlang.org/downloads. Then I downloaded RabbitMQ from here: https://www.rabbitmq.com/install-windows.html

Erlang seems to have installed correctly - I don't see any errors in the logs. RabbitMQ shows this message in the installation logs:

Installing RabbitMQ service...
The filename, directory name, or volume label syntax is incorrect.
The filename, directory name, or volume label syntax is incorrect.
The filename, directory name, or volume label syntax is incorrect.
C:\Program Files\erl8.0\erts-8.0\bin\erlsrv: Service RabbitMQ added to system.
Error spawning C:\Program Files\erl8.0\erts-8.0\bin\epmd -daemon (error 0)
Starting RabbitMQ service...
The filename, directory name, or volume label syntax is incorrect.
The filename, directory name, or volume label syntax is incorrect.
The filename, directory name, or volume label syntax is incorrect.
C:\Program Files\erl8.0\erts-8.0\bin\erlsrv: Failed to start service RabbitMQ.
Error: The process terminated unexpectedly.

I uninstalled both, restarted my laptop and reinstalled but still doesn't work.

I also added Firewall Rules but still no luck. The 2nd firewall rule is for allowing connection for these ports: 4369, 25672, 5672, 5671, 15672, 61613, 61614, 1883, 8883


回答1:


I think I had the same problem which lies in the error

The filename, directory name, or volume label syntax is incorrect.

... and that maybe when erlang was installed it for some reason is sets the HOMEDRIVE to u: or something silly.

From the command line run:

SET HOMEDRIVE=C:

Then try to run your rabbitmq-service again. You may have to stop, remove, install, start it again.

rabbitmq-service stop
rabbitmq-service remove
rabbitmq-service install
rabbitmq-service start

and please make sure that you have copied the .erlang.cookie from c:\Windows to the root of your user folder ( C:\Users\{user}\ )




回答2:


Open the command prompt and run the following commands one by one:

c:\>cd\  
c:\>cd Program Files  
c:\Program Files>cd RabbitMQ Server  
c:\Program Files\RabbitMQ Server>dir  
c:\Program Files\RabbitMQ Server>cd rabbitmq_server-3.8.1  
c:\Program Files\RabbitMQ Server\rabbitmq_server-3.8.1>dir  
c:\Program Files\RabbitMQ Server\rabbitmq_server-3.8.1>cd sbin  
c:\Program Files\RabbitMQ Server\rabbitmq_server-3.8.1\sbin>dir  
c:\Program Files\RabbitMQ Server\rabbitmq_server-3.8.1\sbin>SET HOMEDRIVE=C:

c:\Program Files\RabbitMQ Server\rabbitmq_server-3.8.1\sbin>rabbitmq-service enable

c:\Program Files\RabbitMQ Server\rabbitmq_server-3.8.1\sbin>rabbitmq-plugins enable rabbitmq_management

and please make sure that you have copied the .erlang.cookie from c:\Windows to the root of your user folder ( C:\Users{user}\ )



来源:https://stackoverflow.com/questions/38900125/windows-could-not-start-the-rabbitmq-service-on-local-computer

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!