how to stop rabbitmq servers

我的梦境 提交于 2019-12-05 11:20:58

You have a couple of options:

  1. First, try shutting RabbitMQ down gracefully with the init.d script sudo /etc/init.d/rabbitmq-server stop
  2. If that doesn't work, use ps -eaf | grep erl to find the process and parent ids. The third column in the output is the parent process ID. Find the first ancestor of all the processes that is still the erlang process (not the shell script that started it) and kill that. This should terminate the other sub processes. If not, kill those manually.

I just started using RabbitMQ today and learned that you can cleanly shutdown a rabbitmq-server process by using the command rabbitmqctl stop.

This may not apply to your situation since you don't seem to be the person who launched rabbitmq on your server in the first place but if you have rabbitmqctl in your path, you can try using it to attempt a clean shutdown.

This worked for me (on Linux), when stopping gracefully didn't:

sudo pkill beam.smp

where beam.smp is name of parent RabbitMQ process in most recent version.

If you have pgrep in your system, then you could just

pgrep <proc_name>

It will output a list of pids you can use to kill them

If you used brew when installing, you can use brew services restart rabbitmq, brew services start rabbitmq, brew services stop rabbitmq

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