当前位置:   article > 正文

centos下rabbitmq启动失败:_rabbitmq-server.service: control process exited, c

rabbitmq-server.service: control process exited, code=exited status=1

如果你安装的是rabbitmq-server-3.6.8-1.el7.noarch.rpm,那么什么都别想了,升级到rabbitmq-server-3.7.14-1.el7.noarch.rpm。
启动后失败,用journalctl -xe命令查看如下:

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.
[root@xxxxx install]# journalctl -xe
4月 14 23:05:57 xxxxx rabbitmq-server[1908]: BOOT FAILED
4月 14 23:05:57 xxxxx rabbitmq-server[1908]: ===========
4月 14 23:05:57 xxxxx rabbitmq-server[1908]: Error description:
4月 14 23:05:57 xxxxx rabbitmq-server[1908]: noproc
4月 14 23:05:57 xxxxx rabbitmq-server[1908]: Log files (may contain more information):
4月 14 23:05:57 xxxxx rabbitmq-server[1908]: /data/cc/rabbitmq/log/rabbit@xxxxx.log
4月 14 23:05:57 xxxxx rabbitmq-server[1908]: /data/cc/rabbitmq/log/rabbit@xxxxx-sasl.log
4月 14 23:05:57 xxxxx rabbitmq-server[1908]: Stack trace:
4月 14 23:05:57 xxxxx rabbitmq-server[1908]: [{gen,do_for_proc,2,[{file,“gen.erl”},{line,228}]},
4月 14 23:05:57 xxxxx rabbitmq-server[1908]: {gen_event,rpc,2,[{file,“gen_event.erl”},{line,239}]},
4月 14 23:05:57 xxxxx rabbitmq-server[1908]: {rabbit,ensure_working_log_handlers,0,
4月 14 23:05:57 xxxxx rabbitmq-server[1908]: [{file,“src/rabbit.erl”},{line,823}]},
4月 14 23:05:57 xxxxx rabbitmq-server[1908]: {rabbit,‘-boot/0-fun-0-’,0,[{file,“src/rabbit.erl”},{line,281}]},
4月 14 23:05:57 xxxxx rabbitmq-server[1908]: {rabbit,start_it,1,[{file,“src/rabbit.erl”},{line,417}]},
4月 14 23:05:57 xxxxx rabbitmq-server[1908]: {init,start_em,1,[]},
4月 14 23:05:57 xxxxx rabbitmq-server[1908]: {init,do_boot,3,[]}]
4月 14 23:05:57 xxxxx rabbitmq-server[1908]: =INFO REPORT==== 14-Apr-2019::23:05:57.479723 ===
4月 14 23:05:57 xxxxx rabbitmq-server[1908]: Error description:
4月 14 23:05:57 xxxxx rabbitmq-server[1908]: noproc
4月 14 23:05:57 xxxxx rabbitmq-server[1908]: Log files (may contain more information):
4月 14 23:05:57 xxxxx rabbitmq-server[1908]: /data/cc/rabbitmq/log/rabbit@xxxxx.log
4月 14 23:05:57 xxxxx rabbitmq-server[1908]: /data/cc/rabbitmq/log/rabbit@xxxxx-sasl.log
4月 14 23:05:57 xxxxx rabbitmq-server[1908]: Stack trace:
4月 14 23:05:57 xxxxx rabbitmq-server[1908]: [{gen,do_for_proc,2,[{file,“gen.erl”},{line,228}]},
4月 14 23:05:57 xxxxx rabbitmq-server[1908]: {gen_event,rpc,2,[{file,“gen_event.erl”},{line,239}]},
4月 14 23:05:57 xxxxx rabbitmq-server[1908]: {rabbit,ensure_working_log_handlers,0,
4月 14 23:05:57 xxxxx rabbitmq-server[1908]: [{file,“src/rabbit.erl”},{line,823}]},
4月 14 23:05:57 xxxxx rabbitmq-server[1908]: {rabbit,‘-boot/0-fun-0-’,0,[{file,“src/rabbit.erl”},{line,281}]},
4月 14 23:05:57 xxxxx rabbitmq-server[1908]: {rabbit,start_it,1,[{file,“src/rabbit.erl”},{line,417}]},
4月 14 23:05:57 xxxxx rabbitmq-server[1908]: {init,start_em,1,[]},
4月 14 23:05:57 xxxxx rabbitmq-server[1908]: {init,do_boot,3,[]}]
4月 14 23:05:58 xxxxx rabbitmq-server[1908]: {“init terminating in do_boot”,noproc}
4月 14 23:05:58 xxxxx rabbitmq-server[1908]: init terminating in do_boot (noproc)
4月 14 23:05:58 xxxxx rabbitmq-server[1908]: Crash dump is being written to: erl_crash.dump…done
4月 14 23:05:58 xxxxx systemd[1]: rabbitmq-server.service: main process exited, code=exited, status=1/FAILURE
4月 14 23:05:58 xxxxx rabbitmqctl[2477]: WARNING: Removing trailing slash from RABBITMQ_LOG_BASE
4月 14 23:05:59 xxxxx rabbitmqctl[2477]: Stopping and halting node rabbit@xxxxx …
4月 14 23:05:59 xxxxx rabbitmqctl[2477]: Error: unable to connect to node rabbit@xxxxx: nodedown
4月 14 23:05:59 xxxxx rabbitmqctl[2477]: DIAGNOSTICS
4月 14 23:05:59 xxxxx rabbitmqctl[2477]: ===========
4月 14 23:05:59 xxxxx rabbitmqctl[2477]: attempted to contact: [rabbit@xxxxx]
4月 14 23:05:59 xxxxx rabbitmqctl[2477]: rabbit@xxxxx:
4月 14 23:05:59 xxxxx rabbitmqctl[2477]: * connected to epmd (port 4369) on xxxxx
4月 14 23:05:59 xxxxx rabbitmqctl[2477]: * epmd reports: node ‘rabbit’ not running at all
4月 14 23:05:59 xxxxx rabbitmqctl[2477]: other nodes on xxxxx: [‘rabbitmq-cli-03’]
4月 14 23:05:59 xxxxx rabbitmqctl[2477]: * suggestion: start the node
4月 14 23:05:59 xxxxx rabbitmqctl[2477]: current node details:
4月 14 23:05:59 xxxxx rabbitmqctl[2477]: - node name: ‘rabbitmq-cli-03@localhost’
4月 14 23:05:59 xxxxx rabbitmqctl[2477]: - home dir: .
4月 14 23:05:59 xxxxx rabbitmqctl[2477]: - cookie hash: 6fnToUavedNSqnitldl4iA==
4月 14 23:05:59 xxxxx systemd[1]: Failed to start RabbitMQ broker.
– Subject: Unit rabbitmq-server.service has failed
– Defined-By: systemd
– Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel

– Unit rabbitmq-server.service has failed.

输入erl -v,显示:

Erlang/OTP 21 [erts-10.3.2] [source] [64-bit] [smp:8:8] [ds:8:8:10] [async-threads:1] [hipe]
Eshell V10.3.2 (abort with ^G)

那么就是rabbitmq版本低的原因
首先要卸载掉3.6的MQ,分别执行如下命令:

yum list | grep rabbitmq
  • 1

显示:

rabbitmq-server.noarch 3.7.14-1.el7 installed
librabbitmq.i686 0.8.0-2.el7 base
librabbitmq.x86_64 0.8.0-2.el7 base
librabbitmq-devel.i686 0.8.0-2.el7 base
librabbitmq-devel.x86_64 0.8.0-2.el7 base
librabbitmq-examples.x86_64 0.8.0-2.el7 base
opensips-event_rabbitmq.x86_64 1.10.5-4.el7 epel
rabbitmq-java-client.noarch 3.6.0-1.el7 epel
rabbitmq-java-client-doc.noarch 3.6.0-1.el7 epel
rabbitmq-java-client-javadoc.noarch 3.6.0-1.el7 epel

然后执行

yum -y remove rabbitmq-server.noarch
  • 1

以此类推,分别卸载rabbitmq-java-client.noarch,rabbitmq-java-client-doc.noarch,rabbitmq-java-client-javadoc.noarch
注意,有的文章说要卸载librabbitmq.i686到opensips-event_rabbitmq.x86_64 ,我试了一下完全不用。
卸载后,重新执行

rpm -ivh rabbitmq-server-3.7.14-1.el7.noarch.rpm
  • 1

此时如果可以成功的话,只会提示:

准备中… ################################# [100%]
正在升级/安装…
1:rabbitmq-server-3.7.14-1.el7 ################################# [100%]

这时再执行

service rabbitmq-server start
  • 1

命令行只会提示:

Redirecting to /bin/systemctl start rabbitmq-server.service
在访问服务器:
http://xx.xx.xxx.x:15672
就能进入rabbitmq的首页了。有关建用户和赋权限的本文不讨论
最后吐槽一下,rabbitmq是我安装过的最恶心的一款,没有之一。因为我这边的服务器不能连网用不了yum,各种依赖搞的我想吐,官方敢不敢出个一键安装的版本
有两篇文章推荐给大家,很有参考价值,写文章的人应该是自己试过,按照文档操作最后能起作用:
https://blog.csdn.net/junxieshiguan/article/details/84547918
https://www.cnblogs.com/ylsforever/p/6600925.html

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

闽ICP备14008679号