Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I have RabbitMQ in its latest version installed on my Mac with default configuration and when I'm accessing it from localhost there's no issue what so ever. But today I build a linux machine on local network and no way I'm able to connect to my RabbitMQ server remotely from that machine. I shut down all the firewalls on my Mac and everything that could possibly block the connection. I'm perfectly able to connect to MongoDB running on different port and to any other application, ssh to my macbook and so on, but I can't connect to RabbitMQ (even when I change the port its running on). When I run nmap on linux to check if the appropriate port is open on my Mac I get this:

>> nmap -p 5672 192.168.1.101 
Nmap scan report for 192.168.1.101
Host is up (0.00019s latency).
PORT     STATE  SERVICE
5672/tcp closed amqp

But when I do the same thing right on my Mac:

>> nmap -p 5672 localhost
Nmap scan report for localhost (127.0.0.1)
Host is up (0.00049s latency).
PORT     STATE SERVICE
5672/tcp open  amqp

I added rule to ipfw manually and added rabbitmq-server to system preferences -> security -> firewall -> advanced applications list to allow all incoming connections just in case, but it didn't help. Any idea how to force the port to be open for network access from another computer in local network? When I do it the other way around (install rabbitmq on linux and connect to it from mac) it runs fine..

share|improve this question

3 Answers 3

up vote 7 down vote accepted

When I installed RabbitMQ on Mac OS X, via brew, I had the same problem with port 5672 only being open on localhost.

It turned out that the file /usr/local/etc/rabbitmq/rabbitmq-env.conf contained an entry for NODE_IP_ADDRESS to bind it only to localhost. Removing the NODE_IP_ADDRESS entry from the config binds the port to all network inferfaces.

share|improve this answer

It seems the daemon is binding 127.0.0.1 instead 0.0.0.0, you can check it using netstat tool

share|improve this answer

What worked for me was a combination of both of the prior answers.

Make your /usr/local/etc/rabbitmq/rabbitmq-env.conf look like this:

CONFIG_FILE=/usr/local/etc/rabbitmq/rabbitmq

NODE_IP_ADDRESS=0.0.0.0

NODENAME=rabbit@localhost

(If I remove the NODE_IP_ADDRESS entry completely rabbitmq gives me errors)

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.