rabbitmq on OS X

RabbitMQ is easy to install on OS X with MacPorts using the documentation here:


However, I’ve found two problems.

First, by default the erlang vm isn’t installed with SSL support.  Without SSL, you end up with some startup warnings that look like this:

rob@rs-mbp ~$ sudo rabbitmq-server
Activating RabbitMQ plugins ...
*WARNING* Undefined function crypto:des3_cbc_decrypt/5
*WARNING* Undefined function crypto:start/0
*WARNING* Undefined function ssl:close/1
*WARNING* Undefined function ssl:connection_info/1
*WARNING* Undefined function ssl:controlling_process/2
*WARNING* Undefined function ssl:peercert/1
*WARNING* Undefined function ssl:peername/1
*WARNING* Undefined function ssl:recv/3
*WARNING* Undefined function ssl:send/2
*WARNING* Undefined function ssl:sockname/1
*WARNING* Undefined function ssl:ssl_accept/3
0 plugins activated:

This is easily fixed by rebuilding erlang with the following:

rob@rs-mbp ~$ sudo port install erlang +ssl

The second problem is that when started, the server hangs and then fails after a minute or two with the following error:

ERROR: epmd error for host "rs-mbp": address (unable to establish tcp connection)

This is easily fixed by making sure that your machine name (rs-mbp in my case) is in /private/etc/hosts:

# Host Database
# localhost is used to configure the loopback interface
# when the system is booting.  Do not change this entry.
##       localhost rs-mbp broadcasthost
::1             localhost
fe80::1%lo0     localhost

19 thoughts on “rabbitmq on OS X

  1. Michael Bartz

    I appreciate the pointers. I had a slightly different experience.

    1. I think the latest macport of RabbitMQ forces the SSL install of Erlang.
    2. I spent not jut a little bit of time trying to alter the /etc/hosts file. You MUST make sure that the “hosts.ac” file is updated or deleted or the changes to the private hosts file will not survive a reboot.
    3. Just aliasing my machine name to did not actually start the rabbitmq server correctly on a reboot. The launchctl agent provided by macports starts the “rabbitmq@localhost” but the node created during the installation (with the erlang cookie) is set to the “rabbitmg@machinename”.
    4. I think that there are two solutions: one, alter the launchctl agent (unloading it, changing it and reloading) or, two, setting a rabbitmq-env.conf file and forcing the node name to be equal to the installed node. I chose the latter and it worked.

  2. Steve

    Thanks a ton – the host entry solved my problem. Thanks again for sharing – it would have taken long time for me to resolve .. appreciate your write up.


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s