Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

OS X and rabbitMQ: ERROR: epmd error for host xxx: address (cannot connect to host/port)

I just made to the latest OS X maverick update and I got suprised to see that rabbitMQ is no longueur working. I get the following error:

MacBook-Pro-de-Julio:~ julio$ rabbitmq-server
ERROR: epmd error for host MacBook-Pro-de-Julio: address (cannot connect to host/port)

I use the standalone version of rabbitMQ. I try to re-install it without any success. When I run hostname command I have the following result:

MacBook-Pro-de-Julio:~ julio$ hostname
MacBook-Pro-de-Julio.local

Do you know how to fix this issue?

EDIT 1:

By turning off the Wifi, I can run with success rabbitMQ. If I turn it on, I can't launch rabbitMQ.

EDIT 2:

Thanks to @old_sound answer, I fixed the issue by editing my /etc/hosts.

like image 322
Julio Avatar asked Jul 17 '14 07:07

Julio


4 Answers

ERROR: epmd error for host HostName: timeout (timed out)

sudo mcedit /etc/hosts

add line

127.0.0.1 HostName

resolve my problems (ubuntu)

Find the host name by running command echo $HOSTNAME

like image 77
AgBorkowski Avatar answered Nov 17 '22 03:11

AgBorkowski


This exception never happened to me but appeared today. This worked for me:

  • Disconnected from vpn
  • Started rabbitmq (started successfully now)
  • Reconnected to VPN

Disconnected from vpn Started rabbitmq successfully Reconnected to vpn

And I was able to connect to rabbitmq successfully, so the host resolved successfully even after reconnecting to vpn.

like image 25
b-rad Avatar answered Nov 17 '22 04:11

b-rad


I was getting this error message on linux VM (centos) after a clean install of Erlang and RabbitMQ. I noticed epmd was trying to use the hostname instead of localhost.

My solution was to add the 4369 port to the firewall exceptions.

Additional details in case it helps others...

After calling "rabbitmqctl start_app" it would wait about 2 minutes, then fail with this error in the log file: "epmd error for {hostname}".

I falsely assumed that rabbitmq would be using localhost or 127.0.0.1 by default, but in my case it was using the hostname, which would resolve to the public static IP address.

I was able to work around this by exposing port 4369 through my firewall.

I assume that I could have changed my config to use localhost and avoid the firewall hole, but I wanted to expose it through the firewall eventually anyways.

like image 2
Joseph Snow Avatar answered Nov 17 '22 04:11

Joseph Snow


I brew installed rabbitmq, and had this problem several weeks later after installing.

You may have a look at

/usr/local/etc/rabbitmq/rabbitmq-env.conf

make sure the value of hostname equals the value of NODENAME

You can set the value of hostname by

sudo scutil --set HostName xxx
like image 1
thinker3 Avatar answered Nov 17 '22 05:11

thinker3