18

I am trying to install rabbitmq. The installation of both erlang i.e OTP 18.1 file was done successfulyl and also rabbitmq installation completed successfully. But when I try to connect rabbitmq, I get the following error:

C:\Program Files (x86)\RabbitMQ Server\rabbitmq_server-3.5.6\sbin>rabbitmq-plugins.bat enable rabbitmq_management
Plugin configuration unchanged.
Applying plugin configuration to rabbit@INLN50899724A... failed.
 * Could not contact node rabbit@INLN50899724A.
   Changes will take effect at broker restart.
 * Options: --online  - fail if broker cannot be contacted.
            --offline - do not try to contact broker.
C:\Program Files (x86)\RabbitMQ Server\rabbitmq_server-3.5.6\sbin>rabbitmq-server restart
ERROR: epmd error for host INLN50899724A: address (cannot connect to host/port)

Click below to see the image containing error Error Empd Rabbitmq

M.javid
  • 5,373
  • 3
  • 36
  • 52
Antarjot
  • 266
  • 1
  • 2
  • 9

8 Answers8

22

I may be replying really late, but still I'm facing this issue. So it may help somebody event while installing rabbitmq version 3.6.5. To change the node name, open "rabbitmq-env.bat" under "installation dir\sbin" and change RABBITMQ_NODENAME to "rabbit@localhost" (line number 90 in rabbitmq 3.6.5). But make sure you remove the windows service, do change the nodename, install service and start it. This worked for me. No other options worked for me which were marked as right answer in stackoverflow!

Ashok Kumar P S
  • 243
  • 2
  • 7
  • I had similar issue on my linux server named 176.vm Rabbit tried to connect to host '176' that would not resolve – Dmitriusan Nov 03 '17 at 17:04
  • I'm even later to the party than you, but I wanted to point out that you can also set the value as a Windows environment variable as an alternative to editing the batch file – Sam Nov 25 '17 at 00:13
19

Remove the RabbitMQ service. Uninstall RabbitMQ. Kill the epmd.exe process. Delete your c:\users\\AppData\Roaming\RabbitMQ Directory.

Go to Control Panels -> System -> Advanced -> Environment Variables

Add a variable named RABBITMQ_NODENAME and set it to rabbit@localhost

Reinstall RabbitMQ.

Navigate to the RabbitMQ sbin directory (or run the command from the start menu) and run rabbitmqctl status.

You should no longer see the (cannot connect to host/port) error.

And yes, this will fix your Cisco AnyConnect VPN related installation issues.

Richard Pistole
  • 566
  • 3
  • 7
11

For Windows Machine:

  • Go in C:\Users\<YourUserName>\AppData\Roaming\RabbitMQ
  • Create a file rabbitmq-env.conf
  • Add the following:

    CONFIG_FILE=C:\Users\<YourUserName>\AppData\Roaming\RabbitMQ\rabbitmq
    NODE_IP_ADDRESS=127.0.0.1
    NODENAME=rabbit@localhost
    
  • The above is my env-config, for this particular issue setting the nodename will be sufficient.

  • Turn off you firewall & start the rabbitmq, it will work. After running it one time, even if you turn on the firewall, it will work.

This works for me in Windows 10 machine.

MeltedPenguin
  • 712
  • 9
  • 17
bulkyPanda
  • 145
  • 1
  • 4
  • 2
    I've changed `NODENAME=rabbit` to `NODENAME=rabbit@localhost` on my Linux machine, now it works for me as well, thanks! – denis.peplin Jul 05 '19 at 08:36
10

open C:\Program Files\RabbitMQ Server\rabbitmq_server-3.7.15\sbin\rabbitmq-server.bat

Add the below command as the first line in

set RABBITMQ_NODENAME=rabbit@localhost

refer attached image

enter image description here

Mateen
  • 1,353
  • 1
  • 16
  • 24
3

in your shell

$ export RABBITMQ_NODENAME=rabbit@localhost
$ /sbin/rabbitmq-server  -detached
M.javid
  • 5,373
  • 3
  • 36
  • 52
1

change rabbit@INLN50899724A to rabbit@localhost and try again.

Aditya Chowdhry
  • 181
  • 2
  • 8
  • Can you help me out with it .. How to do that? I have tried changing node name in conf file but it does not reflect. – Antarjot Jul 13 '16 at 09:16
  • find the location of config file in windows . For ex in linux it is found in /etc/rabbitmq/rabbitmq.config . Try changing the node name in the config file. – Aditya Chowdhry Jul 13 '16 at 09:28
  • Yes, I have found rabbitmq.config file in C:\Users\\AppData\Roaming\RabbitMQ.. but I saw that it is blank. So, Do you know what to write in it to change host name – Antarjot Jul 13 '16 at 09:33
0

Or, edits your hosts file so that INLN50899724A points to 127.0.0.1

0

For using rabbit mq on windows 10 for similar error I did below

  1. set RABBITMQ_NODENAME=rabbit@localhost in the path where rabbit MQ is installed i.e for me it was in C:\Program Files\RabbitMQ Server\rabbitmq_server-3.8.5\sbin> and then started .\rabbitmq-server start

Also, I had changed the host to point to my computer name in c:\Windows\System32\Drivers\etc 127.0.0.1 yourhostnamehere

Pal Je
  • 11