Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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?

share|improve this question

3 Answers 3

up vote 7 down vote accepted

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

share|improve this answer
    
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 '11 at 15:49
    
It seems ubuntu 12.04 configures 127.0.1.1 to the hostname of the of the pc by default –  Sam Stoelinga Apr 4 '13 at 10:18

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
share|improve this answer
1  
thx, was stuck with starting the server, this solved it! –  hoberion Mar 21 '11 at 12:16
    
This did it for me, seems to be the least invasive solution. –  jondavidjohn Mar 4 '13 at 4:33

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.

share|improve this answer

Your Answer

 
discard

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.