当我尝试重新启动 mqqtt 服务器时,它失败了,没有任何错误
ubuntu@ip:~$ sudo service rabbitmq-server restart * Restarting message broker rabbitmqserver [fail] ubuntu@ip:~$ sudo service rabbitmq-server status1
然后我尝试启动 rabbitmq-server
ubuntu@ip:~$ sudo service rabbitmq-server start * Starting message broker rabbitmq server message broker already running[ OK ]
之后我尝试停止 rabbitmq-server
ubuntu@ip:~$ sudo service rabbitmq-server stop * Stopping message broker rabbitmq-server FAILED - check /var/log/rabbitmq/startup_\{log, _err\} [fail] ubuntu@:~$
之后我尝试检查建议的日志,但什么也没有
ubuntu@ip:/var/log/rabbitmq$ cat startup_log ERROR: node with name "rabbit" already running on "ip" ubuntu@ip:/var/log/rabbitmq$ cat startup_err ubuntu@ip:/var/log/rabbitmq$
有什么建议吗?如何重启rabbitmq-server
?
编辑:service --status-all
显示 rabbitmq-server 未处于活动状态。
ubuntu@ip:~$ service --status-all [ + ] acpid [ - ] apparmor [ ? ] apport [ + ] atd [ ? ] console-setup [ + ] cron [ ? ] cryptdisks [ ? ] cryptdisks-early [ - ] dbus [ ? ] dns-clean [ + ] friendly-recovery [ - ] grub-common [ ? ] irqbalance [ ? ] killprocs [ ? ] kmod [ - ] landscape-client [ ? ] networking [ ? ] ondemand [ ? ] open-vm-tools [ ? ] pppd-dns [ - ] procps [ - ] rabbitmq-server [ ? ] rc.local [ + ] resolvconf [ - ] rsync [ + ] rsyslog [ ? ] screen-cleanup [ ? ] sendsigs [ - ] ssh [ - ] sudo [ - ] udev [ ? ] umountfs [ ? ] umountnfs.sh [ ? ] umountroot [ - ] unattended-upgrades [ - ] urandom [ - ] x11-common ubuntu@ip:~$
答案1
rabbitmq-server
使用以下方法查找正在运行的进程 ID:ps -ef
- 终止所有找到的进程 ID 以供
rabbitmq
使用sudo kill -9 id1 id2 ...
- 现在
rabbitmq-server
开始sudo service rabbitmq-server start
- 最后验证服务器是否正在运行
ps -ef | grep rabbitmq