Amazon-Web-Services

Rabbitmq-server 重啟失敗

  • March 20, 2016

當我嘗試重新啟動 mqqtt-server 時,它失敗且沒有任何錯誤

`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使用查找正在執行的程序IDps -ef
  2. 殺死所有找到的程序ID以供rabbitmq使用 sudo kill -9 id1 id2 ...
  3. 現在rabbitmq-server開始sudo service rabbitmq-server start
  4. 最後驗證伺服器是否正在執行ps -ef | grep rabbitmq

引用自:https://serverfault.com/questions/764773