Open port 5672/tcp for access to RabbitMQ on Mac
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.
It seems the daemon is binding 127.0.0.1 instead 0.0.0.0, you can check it using netstat tool
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)