ERROR: node with name "rabbit" already running on "localhost"

rabbitmq-server

使用rabbitmq-server启动RabbitMQ后,进行start、restart或stop都会提示错误
ERROR: node with name "rabbit" already running on "localhost",原因是RabbitMQ已在localhost里运行了,但是停止不了。解决记录如下:

zhangguoyedeMacBook-Pro:~ zhangguoye$ rabbitmq-server
ERROR: node with name "rabbit" already running on "localhost"

zhangguoyedeMacBook-Pro:~ zhangguoye$ ps aux|grep epmd
zhangguoye       35736   0.0  0.0  4328468    676   ??  S    四03下午   0:00.08 /usr/local/Cellar/erlang/22.0.2/lib/erlang/erts-10.4.1/bin/epmd -daemon
zhangguoye       67752   0.0  0.0  4268036    804 s009  S+   10:05上午   0:00.00 grep epmd

zhangguoyedeMacBook-Pro:~ zhangguoye$ ps aux|grep erl
zhangguoye       65864   0.1  0.5  5517096  84836 s009  S    10:00上午   0:09.27 /usr/local/Cellar/erlang/22.0.2/lib/erlang/erts-10.4.1/bin/beam.smp -W w -A 128 -MBas ageffcbf -MHas ageffcbf -MBlmbcs 512 -MHlmbcs 512 -MMmcs 30 -P 1048576 -t 5000000 -stbt db -zdbbl 128000 -K true -B i -- -root /usr/local/Cellar/erlang/22.0.2/lib/erlang -progname erl -- -home /Users/zhangguoye -- -pa /usr/local/Cellar/rabbitmq/3.7.15/ebin  -noshell -noinput -s rabbit boot -sname rabbit@localhost -boot /usr/local/opt/erlang/lib/erlang/bin/start_clean -kernel inet_default_connect_options [{nodelay,true}] -rabbit tcp_listeners [{"127.0.0.1",5672}] -sasl errlog_type error -sasl sasl_error_logger false -rabbit lager_log_root "/usr/local/var/log/rabbitmq" -rabbit lager_default_file "/usr/local/var/log/rabbitmq/[email protected]" -rabbit lager_upgrade_file "/usr/local/var/log/rabbitmq/rabbit@localhost_upgrade.log" -rabbit enabled_plugins_file "/usr/local/etc/rabbitmq/enabled_plugins" -rabbit plugins_dir "/usr/local/Cellar/rabbitmq/3.7.15/plugins" -rabbit plugins_expand_dir "/usr/local/var/lib/rabbitmq/mnesia/rabbit@localhost-plugins-expand" -os_mon start_cpu_sup false -os_mon start_disksup false -os_mon start_memsup false -mnesia dir "/usr/local/var/lib/rabbitmq/mnesia/rabbit@localhost" -kernel inet_dist_listen_min 25672 -kernel inet_dist_listen_max 25672
zhangguoye       35736   0.0  0.0  4328468    688   ??  S    四03下午   0:00.08 /usr/local/Cellar/erlang/22.0.2/lib/erlang/erts-10.4.1/bin/epmd -daemon
zhangguoye       68953   0.0  0.0  4268036    804 s009  S+   10:11上午   0:00.00 grep erl
zhangguoye       65877   0.0  0.0  4270068    828   ??  Ss   10:00上午   0:00.36 erl_child_setup 7168

zhangguoyedeMacBook-Pro:~ zhangguoye$ kill -9 65864

zhangguoyedeMacBook-Pro:~ zhangguoye$ rabbitmq-server

  ##  ##
  ##  ##      RabbitMQ 3.7.15. Copyright (C) 2007-2019 Pivotal Software, Inc.
  ##########  Licensed under the MPL.  See https://www.rabbitmq.com/
  ######  ##
  ##########  Logs: /usr/local/var/log/rabbitmq/[email protected]
                    /usr/local/var/log/rabbitmq/rabbit@localhost_upgrade.log

              Starting broker...
 completed with 6 plugins.

brew管理RabbitMQ

使用mac的用户可以直接使用brew进行安装与管理RabbitMQ

1. 安装

Homebrew安装:https://www.rabbitmq.com/inst...

# 更新
$ brew update

# 安装
$ brew install rabbitmq

2. 运行

# 启动
$ brew services start rabbitmq

# 重启
$ brew services restart rabbitmq

# 停止
$ brew services stop rabbitmq

你可能感兴趣的:(centos7,server,rabbitmq)