Error when installing rabbitMQ server on Ubuntu 10.10

When I install rabbitMQ in synaptic via the following command

sudo apt-get install rabbitmq-server

it returns an error:

Starting rabbitmq-server: FAILED - check /var/log/rabbitmq/startup_log, _err
rabbitmq-server.
invoke-rc.d: initscript rabbitmq-server, action "start" failed.
dpkg: error processing rabbitmq-server (--configure):
 subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
 rabbitmq-server
E: Sub-process /usr/bin/dpkg returned an error code (1)

Going to the logs, it says the following:

Error: {cannot_connect_to_epmd,"herman-desktop",address}

while my /etc/hosts is defined as follows:

127.0.0.1 localhost.localdomain localhost
::1 herman-desktop localhost6.localdomain6 localhost6
127.0.1.1 herman-desktop

What do I need to do to fix this?


Solution 1:

You have the "herman-desktop" configured in /etc/hosts to the localhost address in ipv6 only, since rabbitmq is running ipv4 it won't be able to connect, edit /etc/hosts and add herman-desktop (your machine name I suppose) to the line of 127.0.0.1 (localhost on ipv4)

Also unless you have 127.0.1.1 configured on your machine it looks like a type to me :)

Solution 2:

Best way is to tell rabbitmq to not to look for hostname. You can do that using rabbitmq config file.

edit config, create it if it does not exist

vim /etc/rabbitmq/rabbitmq.conf
vim /etc/rabbitmq/rabbitmq-env.conf (in later versions of RabbitMQ)

Add following entries:

NODENAME=rabbit@localhost 
NODE_IP_ADDRESS=127.0.0.1