Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I've got a fresh installation of rabbitmq-server on a Lucid EC2 instance. The hostname is set correctly, but rabbitmq won't pick up the hostname, and insists on calling itself localhost. Any idea how to convince it otherwise?

$ cat /etc/hostname

$ hostname

$ cat /etc/hosts localhost mifune

$ sudo rabbitmqctl status
Status of node rabbit@localhost ...
                        {mnesia,"MNESIA  CXC 138 12","4.4.12"},
                        {os_mon,"CPO  CXC 138 46","2.2.4"},
                        {sasl,"SASL  CXC 138 11","2.1.8"},
                        {stdlib,"ERTS  CXC 138 10","1.16.4"},
                        {kernel,"ERTS  CXC 138 10","2.13.4"}]},
share|improve this question

Would you believe that switching the order of /etc/hosts/ from: localhost mifune

to: mifune localhost

does the trick?

Make sure you stop rabbitmq before doing this, or rabbitmq will forget who it is and begin wandering around the neighborhood, pestering everybody for directions to the supermarket. It may also go catatonic and need to be completely purged and reinstalled.

share|improve this answer
Yes, I would believe this -- it's pretty much standard behaviour across most network-speaking applications. – womble May 11 '12 at 22:36
I had assumed that it would believe hostname, but I suppose that doesn't guarantee an addressable name? – David Eyk May 11 '12 at 23:23
Indeed; that is precisely why it's done -- because the hostname that someone might specify doesn't exist on the network. If you want the full gory details, hostname(1) is full of mind-twisting. – womble May 12 '12 at 0:02
I've run into this exact thing before with a custom Erlang application. Being that RMQ is written in Erlang, this makes sense now... – EEAA May 12 '12 at 3:15

Your Answer


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.