【問題管理】 -- RabbitMQ啟動時報錯:Job for rabbitmq-server.service failed because the control process exited with error code. See "systemctl status rabbl -xe" for details.


1.問題背景

基於docker容器yum install安裝的RabbitMQ,這里需要修改RabbitMQ下的相關配置文件,我這里關閉了RabbitMQ。

 

修改之后重啟RabbitMQ,發現Restart不了了,而且還直接拋出了異常~~尷尬!

異常信息:

Job for rabbitmq-server.service failed because the control process exited with error code. See "systemctl status rabbl -xe" for details.

於是在網上查詢了一下這個報錯的解決方法,Nice,還真找到了!

 

1.1.解決方法

①使用命令journalctl -xe,定位到詳細的報錯日志信息;

journalctl -xe

通過這個執行到命令行后,會打印出非常多的問題信息,讓我們繼續往下定位到ERROR處:

 

 好的,問題大致清楚了,是啟動時的端口被占用了,導致的起不來!

 

②執行rabbitmq-server -detached,重啟編譯並運行RabbitMQ服務,會打印出更標准的日志信息:

rabbitmq-server –detached

 

 這里可以看到基本就是雲服務器上的一個process進程占用了port 25672端口,導致MQ不能使用這個端口進行通訊,啟動不來!

 

③通過netstat -lnp | grep 25672命令,找到罪魁禍首,是哪個進程搞得鬼!

netstat -lnp | grep 端口號

 

 可以看到這里是docker上面的一個進程占用了25672端口,因為我的RabbitMQ是運行在docker容器中的,這里我先關閉了RabbitMQ Service,但是docker本身並沒有關閉,那么同docker一起運行的還有erlang安裝環境(RabbitMQ本身依賴),那么可能就占用了25672端口,所以我就一起把dokcer也重新啟動了,相當於關閉了erlang運行環境等等的東西

 

在次啟動RabbitMQ服務,正常啟動運行!問題解決!

 

1.2.問題總結及相關類似問題

這個問題簡單說就是關閉RabbitMQ太隨意導致的,一般我們關閉容器內的RabbitMQ可以直接關閉dokcer容器(鑒於容器內的服務只有一個RabbitMQ的情況下),或者重啟RabbitMQ時,需要看下有沒有其它依賴

問題關聯搜索了兩篇比較相似的博文:

RabbitMQ安裝時遇到的若干問題

RabbitMq入門到精通-ERROR: distribution port 25672 in use by rabbit

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



猜您在找 Job for rabbitmq-server.service failed because the control process exited with error code. See "systemctl status rabbitmq-server.service" and "journalctl -xe" for details. linux----------啟動network的時候報錯Job for network.service failed because the control process exited with error code. See "systemctl status network.service" and "journalctl -xe" for details. 啟動Jenkins報錯"Job for jenkins.service failed because the control process exited with error code. See "systemctl status jenkins.service" and "journalctl -xe" for details."解決辦法 centos7啟動MySQL報 Job for mysqld.service failed because the control process exited with error code. See "systemctl status mysqld.service" and "journalctl -xe" for details. Jenkins報錯:Job for jenkins.service failed because the control process exited with error code. See "systemctl status jenkins.service" and "journalctl -xe" for details. Job for dhcpd.service failed because the control process exited with error code. See "systemctl status dhcpd.service" and "journalctl -xe" for details.問題 docker 啟動失敗 Job for docker.service failed because the control process exited with error code. See "systemctl status docker.service" and "journalctl -xe" for details. 啟動Nginx服務失敗:Job for nginx.service failed because the control process exited with error code. See "systemctl status nginx.service" and "journalctl -xe" for details. docker 報錯: Job for docker.service failed because the control process exited with error code. See "systemctl status docker.service" and "journalctl -xe" for details. Restarting network (via systemctl): Job for network.service failed because the control process exited with error code. See "systemctl status network.service" and "journalctl -xe" for details.
 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM