Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Unable to connect to local RabbitMQ on Windows 10

Tags:

rabbitmq

I've installed RabbitMQ (latest version downloadable from RabbitMQ website) on my Windows 10 machine. It installed with ERlang 19.1.

I'm trying to install RabbitMQ Web UI Management Tools using the following command (using RabbitMQ Command Prompt):

rabbitmq-plugins enable rabbitmq_management

I'm getting the following error:

The directory name is invalid.
The filename, directory name, or volume label syntax is incorrect.
The filename, directory name, or volume label syntax is incorrect.    
Plugin configuration unchanged.

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

I've looked up on SO and tried stopping and restarting, overriding erlang cookie, but nothing helps.

I think there's a problem with RabbitMQ itself. The service itself is marked as started, but if I try to telnet the default port (5672) then it fails (it's not a firewall issue - I've disabled it).

Also I don't see an log files created for RabbitMQ or any related Event Logs messages. So it's hard to diagnose exactly the problem.

I also tried uninstalling and re-install both erlang and RabbitMQ. Still didn't help.

How do I further diagnose the problem?

like image 258
developer82 Avatar asked Nov 03 '16 14:11

developer82


People also ask

How do I access RabbitMQ locally?

If you're running Rabbit MQ locally you can use localhost in place of the host. Opening the URL in the browser, you'll see a login page, enter guest for both username and password to access the administrative parts. Yay! ✌️ That's it, start Rabbiting your MQs 😛.

Can't connect to RabbitMQ?

Make sure the node is running using rabbitmq-diagnostics status. Verify config file is correctly placed and has correct syntax/structure. Inspect listeners using rabbitmq-diagnostics listeners or the listeners section in rabbitmq-diagnostics status. Inspect effective configuration using rabbitmq-diagnostics environment.

Does RabbitMQ work on Windows?

RabbitMQ will run on any Windows version that supported Erlang/OTP releases can run on, both desktop and server editions. This includes Windows 10, Server 2012 through 2022.


2 Answers

Found a solution to the problem (downgrading Erlang did not work in my case, but just in case I left it on Erlang 18 in case there were other issues with ver 19).

What puzzled my eye was this line: Applying plugin configuration to rabbit@[0x7FF9A8527044]... failed.. Seems like it's trying to connect to rabbit instance at a wrong machine name.

I then ran rabbitmqctl.bat status which failed but again showed that it's trying to connect to [0x7FF9A8527044] while the node name was rabbit@my-mchine-name. So I started reading the configuration section at RabbitMQ website and the solution was simple - setting the node name manually.

All I had to do is add an environment variable named RABBITMQ_NODENAME with the node name being rabbit@localhost. And that's it. Problem solved!

like image 197
developer82 Avatar answered Oct 12 '22 23:10

developer82


you may be running into issues with Erlang 19 incompatibility. there has been some history of Erlang 19 support problems with RMQ. Try installing Erlang 18 instead.

If that fails, I would recommend using Docker for Windows and installing / running RabbitMQ in that. I've moved all my services like RabbitMQ, MongoDB, etc. into Docker containers and it's made my life as a dev so much simpler.

like image 34
Derick Bailey Avatar answered Oct 13 '22 00:10

Derick Bailey