[erlang-bugs] epmd assumes is always available

Thomas Steen Rasmussen <>
Sat Oct 13 22:31:03 CEST 2012

Hello guys,

I am using erlang in a FreeBSD jail for RabbitMQ and I've hit what I
belive is a wrong assumption in epmd. FreeBSD jails do not have available. Instead you normally add the jails IP as
localhost in /etc/hosts to help software that connects to localhost
find the correct IP to use.

However in the case of erlang, in line 198 of erl_epmd.erl:
The localhost IP is assumed to be I believe this should be
a DNS lookup of the name "localhost" to accomodate systems without a IP.

When I patched line 198 in erl_epmd.erl to use the jails IP instead of, and added the jails IP as "localhost" in /etc/hosts, it
worked like a charm. Before the change, I got the following error when
trying to start rabbitmq: http://pastebin.com/Aw4Bd7wm

I am by no means an erlang expert, in fact today may be the first
time I've really looked at erlang code, so making the change myself
might be a bit much for me. But what do you think ? Do you agree that
this can be considered a bug ?

Best regards,

Thomas Steen Rasmussen

ps. Someone just reminded me that this wouldn't work in an ipv6 only
environment either, just one more reason to make the change :)

More information about the erlang-bugs mailing list