4

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?

3 Answers 3

7

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 :)

2
  • Thanks, but it's still not working. Could you please provide an example of how that 127.0.0.1 line should look? Also, 127.0.1.1 is really configured, but don't ask me why
    – Herman
    Jan 23, 2011 at 15:49
  • It seems ubuntu 12.04 configures 127.0.1.1 to the hostname of the of the pc by default Apr 4, 2013 at 10:18
7

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
2
  • 1
    thx, was stuck with starting the server, this solved it!
    – hoberion
    Mar 21, 2011 at 12:16
  • This did it for me, seems to be the least invasive solution. Mar 4, 2013 at 4:33
0

This happened to me when I changed the hostname while installing chef-server. I reverted back to the old hostname, killed running rabbitmq processes, purged rabbitmq package, then re-run chef-solo bootstrap of chef-server.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .