当前位置:   article > 正文

Rabbitmq启动报错: Job for rabbitmq-server.service failed because the control process exited with_apr 12 10:16:43 zzcxcscsy176x24140 rabbitmq-server

apr 12 10:16:43 zzcxcscsy176x24140 rabbitmq-server[3948459]: completed with

Rabbitmq启动报错: Job for rabbitmq-server.service failed because the control process exited with error code

Rabbitmq启动报错如下:

Redirecting to /bin/systemctl status rabbitmq-server.service
● rabbitmq-server.service - RabbitMQ broker
Loaded: loaded (/usr/lib/systemd/system/rabbitmq-server.service; enabled; vendor preset: disabled)
Active: inactive (dead) (Result: exit-code) since 四 2021-06-17 18:01:07 CST; 1min 21s ago
Process: 6558 ExecStop=/usr/sbin/rabbitmqctl shutdown (code=exited, status=69)
Process: 6398 ExecStart=/usr/sbin/rabbitmq-server (code=exited, status=1/FAILURE)
Main PID: 6398 (code=exited, status=1/FAILURE)

6月 17 18:01:00 xxxx systemd[1]: Failed to start RabbitMQ broker.
6月 17 18:01:00 xxxx systemd[1]: Unit rabbitmq-server.service entered failed state.
6月 17 18:01:00 xxxx systemd[1]: rabbitmq-server.service failed.
6月 17 18:01:07 xxxx systemd[1]: Stopped RabbitMQ broker.
[root@xxxx /]# /sbin/service rabbitmq-server start
Redirecting to /bin/systemctl start rabbitmq-server.service
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.
rabbitmq启动报错截图

运行环境

操作系统/软件

版本

Linux xxxx3.10.0-693.el7.x86_64 #1 SMP Tue Aug 22 21:09:27 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux

CentOS 7.x

erlang-21.3-1.el7.x86_64

21.3-1

rabbitmq-server-3.8.8-1.el7.noarch

3.8.8-1

原因分析

根据报错日志,常见原因有两个:

  1. erlang未安装 ,导致启动报错;
    先检查erlang是否已安装:
    ①.rpm -qa | grep erlang

    [root@xxxx /]# rpm -qa|grep erlang
    erlang-21.3-1.el7.x86_64
    
    • 1
    • 2

    如果未安装erlang,则不会显示类似“erlang-21.3-1.el7.x86_64”的结果

  2. host文件配置问题 ,导致mq启动时读取不到;

    [root@xxxx /]# vim /etc/hosts
    
    127.0.0.1   localhost localhost.localdomain localhost4 localhost4.localdomain4
    ::1         localhost localhost.localdomain localhost6 localhost6.localdomain6
    192.168.38.110 xxxx
    
    • 1
    • 2
    • 3
    • 4
    • 5

    如果hosts文件中,未添加ip-主机名的映射,则添加即可。
    备注:
    获取主机名

    [root@xxxx /]# hostname
    xxxx
    
    • 1
    • 2

    xxxx 即主机名

重启Rabbitmq

[root@xxxx /]# systemctl restart rabbitmq-server 
[root@xxxx /]# systemctl status rabbitmq-server
● rabbitmq-server.service - RabbitMQ broker
   Loaded: loaded (/usr/lib/systemd/system/rabbitmq-server.service; enabled; vendor preset: disabled)
   Active: active (running) since 四 2021-06-17 19:07:19 CST; 56s ago
  Process: 11504 ExecStop=/usr/sbin/rabbitmqctl shutdown (code=exited, status=0/SUCCESS)
 Main PID: 11551 (beam.smp)
   Status: "Initialized"
   CGroup: /system.slice/rabbitmq-server.service
           ├─11551 /usr/lib64/erlang/erts-10.3/bin/beam.smp -W w -K true -A 64 -MBas ageffcbf -MHas ageffcbf -MBlmbcs 512 -MHlmbcs 512 -MMmcs 30 -P 10485...
           ├─11655 erl_child_setup 32768
           ├─11699 inet_gethost 4
           └─11700 inet_gethost 4

6月 17 19:07:16 xxxx rabbitmq-server[11551]: ##########  Licensed under the MPL 2.0. Website: https://rabbitmq.com
6月 17 19:07:16 xxxx rabbitmq-server[11551]: Doc guides: https://rabbitmq.com/documentation.html
6月 17 19:07:16 xxxx rabbitmq-server[11551]: Support:    https://rabbitmq.com/contact.html
6月 17 19:07:16 xxxx rabbitmq-server[11551]: Tutorials:  https://rabbitmq.com/getstarted.html
6月 17 19:07:16 xxxx rabbitmq-server[11551]: Monitoring: https://rabbitmq.com/monitoring.html
6月 17 19:07:16 xxxx rabbitmq-server[11551]: Logs: /var/log/rabbitmq/rabbit@xxxx.log
6月 17 19:07:16 xxxx rabbitmq-server[11551]: /var/log/rabbitmq/rabbit@xxxx_upgrade.log
6月 17 19:07:16 xxxx rabbitmq-server[11551]: Config file(s): (none)
6月 17 19:07:19 xxxx rabbitmq-server[11551]: Starting broker... completed with 3 plugins.
6月 17 19:07:19 xxxx systemd[1]: Started RabbitMQ broker.
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24

运行成功,至此问题解决。

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/知新_RL/article/detail/928389
推荐阅读
相关标签
  

闽ICP备14008679号