rabbitmq-server fails to start after hostname has changed for first time

Thanks to Richard H Fung.

His steps helped me to solve this issue.

But I did not have to re-install the rabbitmq.

When I opened my /etc/hosts file I found that IP assigned to my hostname is different than the actual ip(192.168.1.200 [static]).

#/etc/hosts  
127.0.0.1       localhost  
192.168.1.115   HOSTNAME

so I just changed IP address to 192.168.1.200 in my /etc/hosts file and it worked fine.


Remove the old installation of RabbitMQ to fix this problem. Here are steps to reinstall RabbitMQ. These commands are run as the root user:

  1. Stop RabbitMQ: rabbitmqctl stop

  2. Change /etc/hosts

  3. Change /etc/hostname

  4. Uninstall old RabbitMQ: dpkg -P rabbitmq-server

  5. Remove RabbitMQ’s database: rm -rf /var/lib/rabbitmq

  6. Find erlang’s process that is running rabbit: ps ax | grep rabbit

  7. Kill the listed process

  8. Reinstall RabbitMQ: apt-get install rabbitmq-server

I wrote about these steps on my blog.

REVISION

I moved my blog to a new website.