首页 > 编程学习 > RabbitMQ启动失败解决

RabbitMQ启动失败解决

发布时间:2022/1/17 11:36:13

RabbitMQ启动失败解决

对梦想的牵挂 2019-06-14 15:04:01  39160  收藏 6
分类专栏: 【----linux----】 【----RabbitMQ----】 文章标签: RabbitMQ Liunx
版权

【----linux----】
同时被 2 个专栏收录
10 篇文章0 订阅
订阅专栏

【----RabbitMQ----】
1 篇文章0 订阅
订阅专栏
使用systemctl start rabbitmq-server.service启动rabbitmq时报错:

[root@rhos5-rabbitmq1 ~]# systemctl start rabbitmq-server
Jun 13 21:03:08 jeckersb-f20 systemd[1]: Starting RabbitMQ broker...
Jun 13 21:03:09 jeckersb-f20 rabbitmqctl[1186]: Waiting for 'rabbit@jeckersb-f20' ...
Jun 13 21:03:09 jeckersb-f20 rabbitmqctl[1186]: pid is 1185 ...
Jun 13 21:03:09 jeckersb-f20 systemd[1]: rabbitmq-server.service: main process exited, code=exited, status=1/FAILURE
Jun 13 21:03:09 jeckersb-f20 rabbitmqctl[1186]: Error: process_not_running
Jun 13 21:03:09 jeckersb-f20 systemd[1]: rabbitmq-server.service: control process exited, code=exited status=2
[root@rhos5-rabbitmq1 ~]# rabbitmqctl status
Status of node 'rabbit@rhos5-rabbitmq1' ...
Error: unable to connect to node 'rabbit@rhos5-rabbitmq1': nodedown

DIAGNOSTICS
===========

nodes in question: ['rabbit@rhos5-rabbitmq1']

hosts, their running nodes and ports:
- rhos5-rabbitmq1: [{rabbitmqctl2980,45861}]

current node details:
- node name: 'rabbitmqctl2980@rhos5-rabbitmq1'
- home dir: /var/lib/rabbitmq
- cookie hash: vzI5NUyusQhCrkRr6GAhpQ==



这个根本看不出启动失败原因
看了一些原因,有的说是文件需要删除
/var/lib/rabbitmq/mnesia 目录下存在rabbit@localhost.pid、rabbit@localhost、rabbit@localhost-plugins-expand,删除这3项后,再使用systemctl start rabbitmq-server启动,发现还是启动失败
又换了直接使用rabbitmq-server启动
这次提示:

{"could not start kernel pid",application_controller,"error in config file \"c:/Users/yupeipei/AppData/Roaming/RabbitMQ/
rabbitmq.config\" (256): syntax error before: ']'"}
could not start kernel pid (application_controller) (error in config file "c:/Users/yupeipei/AppData/Roaming/RabbitMQ/ra
bbitmq.config" (256): syntax error before: ']')

发现自己编辑 /etc/rabbitmq/rabbitmq.config 文件。添加远程访问用户的配置多了一个逗号 ‘,’

[
{rabbit, [{tcp_listeners, [5672]}, {loopback_users, [“asdf”]},]}
]

删除逗号在次重启,服务成功启动!
————————————————
版权声明:本文为CSDN博主「对梦想的牵挂」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。
原文链接:https://blog.csdn.net/qq_37338761/article/details/91974716

Copyright © 2010-2022 ngui.cc 版权所有 |关于我们| 联系方式| 豫B2-20100000