[rabbitmq-discuss] FYI: RabbitMQ default installation broken on Ubuntu (potential all Debian-likes)

Rene Gallati regal at nine.ch
Fri Sep 7 14:49:45 BST 2012


Hello list,

as a service provider I was tasked to install RabbitMQ for a customer 
system. No problem, it's in Ubuntu's default repository, right?

Too bad it's broken and the installation via package manager fails. And 
while that may be a Ubuntu maintainer's problem the very same thing happens 
if one uses the official apt-repository provided at 
http://www.rabbitmq.com/install-debian.html

What breaks? Well the package installs correctly but then tries to start 
the rabbitmq-server service. And this doesn't work, the service is not 
startable because it has a very odd requirement: rabbitmq-server cannot be 
started on current Ubuntu 12.04 LTS systems because it claims that the 
"hostname is unresolvable". This is however a wrong error message, because 
the hostname can be perfectly resolvable when rabbitmq-server claims this. 
What is really happening is, that rabbitmq-server absolutely requires that 
the hostname-part be defined as entry in /etc/hosts as name for 127.0.0.1 !

So if your system is named "foo" you have to have
127.0.0.1 localhost foo

in your /etc/hosts and then it will magically be "resolvable" and starts. 
Unfortunately, the default for all modern unix systems is that the hostname 
is assigned to the real IP address and not to 127.0.0.1 and this is why the 
standard installation package is broken by default.

As an alternative, you can also add "NODENAME=rabbit at localhost" to 
rabbitmq-server's configuration file because - look it's magic: localhost 
does actually resolve to 127.0.0.1 which is what rabbitmq-server seems to 
require to function. The problem with that approach is of course that the 
configuration file does not exist prior to attempting to install the 
package via package-manager on your system, so you have to install the 
faulty installation, then add the line in the configuration file, then fix 
the package-installation by rerunning in order to get to a clean state.

Since I have no experience with RabbitMQ itself, I have no idea why this is 
so or what exactly is wrong on my (100% clean and default) system 
configuration for this to appear. If RabbitMQ really really requires the 
hostname to be mapped to 127.0.0.1 by default then this is the first 
networking program with this requirement I've encountered in over 15 years 
of administrating linux systems. I think it's a bug and this is why I 
document this here so that it can be fixed.

Kind regards

René
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rabbitmq.com/pipermail/rabbitmq-discuss/attachments/20120907/14a68169/attachment.htm>


More information about the rabbitmq-discuss mailing list