如何在本地主机上停止RabbitMQ服务器 [英] How do I stop the RabbitMQ server on localhost
问题描述
我在OS X上安装了RabbitMQ服务器,并在命令行上启动了它.现在,不知道如何停止运行?我做完之后:
I installed RabbitMQ server on OS X, and started it on command line. Now, it is not obvious that how I should stop it from running? After I did:
sudo rabbitmq-server -detached
我得到:
Activating RabbitMQ plugins ...
0 plugins activated:
就是这样.我应该如何正确关闭它?在文档中,它提到使用rabbitmqctl(1)
,但是我不清楚这意味着什么.谢谢.
That was it. How should I properly shut it down? In the document, it mentions using rabbitmqctl(1)
, but it's not clear to me what that means. Thanks.
根据下面的评论,这就是我运行sudo rabbitmqctl stop
所得到的:
As per comment below, this is what I get for running sudo rabbitmqctl stop
:
(project_env)mlstr-1:Package mlstr$ sudo rabbitmqctl stop
Password:
Stopping and halting node rabbit@h002 ...
Error: unable to connect to node rabbit@h002: nodedown
DIAGNOSTICS
===========
nodes in question: [rabbit@h002]
hosts, their running nodes and ports:
- h002: [{rabbit,62428},{rabbitmqctl7069,64735}]
current node details:
- node name: rabbitmqctl7069@h002
- home dir: /opt/local/var/lib/rabbitmq
- cookie hash: q7VU0JjCd0VG7jOEF9Hf/g==
为什么仍然有一个当前节点"?我没有运行任何客户端程序,只有RabbitMQ服务器,这是否意味着服务器仍在运行?
Why is there still a 'current node'? I have not run any client program but only the RabbitMQ server, does that mean a server is still running?
推荐答案
事实证明,它与权限有关.我的rabbitmq服务器以某种方式从用户"rabbitmq"启动(这很奇怪),所以我不得不这样做
It turns out that it is related to permissions. Somehow my rabbitmq server was started with user 'rabbitmq' (which is strange), so that I had to do
sudo -u rabbitmq rabbitmqctl stop
这篇关于如何在本地主机上停止RabbitMQ服务器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!