Jak zatrzymać serwer RabbitMQ na localhost

Zainstalowałem Serwer RabbitMQ na OS X i uruchomiłem go w wierszu poleceń. Nie jest oczywiste, jak mam go powstrzymać? Po zrobieniu:

sudo rabbitmq-server -detached

Otrzymuję:

Activating RabbitMQ plugins ...
0 plugins activated:
To było to. Jak mam to właściwie wyłączyć? W dokumencie wspomina się o użyciu rabbitmqctl(1), ale nie jest dla mnie jasne, co to oznacza. Dzięki.

Edit: jak w komentarzu poniżej, to dostaję za bieganie 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==

Dlaczego wciąż istnieje 'aktualny węzeł'? Ja nie uruchom dowolny program kliencki, ale tylko serwer RabbitMQ, czy to oznacza, że serwer nadal działa?

Author: John Saunders, 2012-05-15

3 answers

Okazuje się, że jest to związane z uprawnieniami. W jakiś sposób mój serwer rabbitmq został uruchomiony z użytkownikiem 'rabbitmq' (co jest dziwne), więc musiałem zrobić

sudo -u rabbitmq rabbitmqctl stop
 64
Author: MLister,
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/doraprojects.net/template/agent.layouts/content.php on line 54
2012-05-23 19:50:06

W moim środowisku dev, gdzie cały czas go używam, używam:

launchctl unload ~/Library/LaunchAgents/homebrew.mxcl.rabbitmq.plist

I na początek

launchctl load ~/Library/LaunchAgents/homebrew.mxcl.rabbitmq.plist
Jeszcze łatwiej....
brew services stop rabbitmq
brew services start rabbitmq
 31
Author: Mike Holdsworth,
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/doraprojects.net/template/agent.layouts/content.php on line 54
2017-01-12 21:27:04

Użyj rabbitmqctl stop, aby zatrzymać dowolny węzeł. Jeśli chcesz określić węzeł, który powoduje problemy, Dodaj opcję -n rabbit@[hostname].

 23
Author: Shaun,
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/doraprojects.net/template/agent.layouts/content.php on line 54
2018-08-28 12:30:46