Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I stop the RabbitMQ server on localhost

Tags:

rabbitmq

amqp

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 

I get:

Activating RabbitMQ plugins ... 0 plugins activated: 

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.

Edit: 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== 

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?

like image 355
MLister Avatar asked May 15 '12 21:05

MLister


People also ask

How do I stop RabbitMQ server on Windows?

Erlang Distribution Port Stop the RabbitMQ Windows service using . \rabbitmq-service. bat stop. Remove the RabbitMQ Windows service using .


1 Answers

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 
like image 53
MLister Avatar answered Sep 18 '22 23:09

MLister