问题描述
我在 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
这篇关于如何在 localhost 上停止 RabbitMQ 服务器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!