Error with rabbit-mq server

孤街浪徒 提交于 2019-12-04 06:35:49

I had this issue twice, when either hostname or ip address in the hosts file didn't match. Therefore, check that you provide the correct ip address and hostname in the /etc/hosts file

  1. Run sudo cat /etc/hostname to see your hostname

Output:

yoursite
  1. Run sudo nano /etc/hosts

File contains:

127.0.0.1 yoursite

As you see from cat /etc/hostname, hostname is the same as in the /etc/hosts:

  1. Run sudo rabbitmq-server start to start the rabbitmq-server

Try deleting the folder /var/lib/rabbitmq and re-running ./stack.sh

If that doesn't work either, run the following after stach.sh fails:

chown -R rabbitmq:rabbitmq /var/lib/rabbitmq chown -R rabbitmq:rabbitmq /var/log/rabbitmq

service rabbitmq-server restart

and check the status of rabbitmq using "rabbitmqctl status"

Similar thing happen to me. Rabbit depends on being able to resolve a hostname, run this:

echo "127.0.0.1 $(hostname -s)" | sudo tee -a /etc/hosts

This way works for me. First go to

sudo vim /etc/hosts

and set

127.0.0.1 <hostname>

then open firewall

sudo rabbitmq-plugins enable rabbitmq_management
sudo service rabbitmq-server restart

For a clean environment, this will not happen. You must run devstack for several times, and one of them failed but you didn't get it cleaned.

run command pf -ef | grep rabbitmq, kill all rabbitmq processes. then it would be fine to run ./stack.sh

it is highly recommended to run ./unstack.sh && ./clean.sh before ./stack.sh

Caberset Mercabarna

Just to be sure, take a look to your local network

ip add

If there's no lo network, then you should enable it:

ifconfig lo up

Then restart the server again and let's see if it works again now

systemctl start rabbitmq-server
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!