背景:
在测试大量的Celery定时任务完成之后我并没有去关闭这个Task服务,当我再次查看Rabbmqit队列信息时发生以下错误信息:
Listing queues ...
Error: unable to connect to node 'rabbit@vm': nodedown
DIAGNOSTICS
===========
nodes in question: ['rabbit@vm']
hosts, their running nodes and ports:
- vm10-11-0-63: [{rabbitmqctl65614,27801}]
current node details:
- node name: 'rabbitmqctl65614@vm'
- home dir: /var/lib/rabbitmq
- cookie hash: nlr2eMs6bmizAorhmEkw==
发现Rabbitmq服务已经停止了运行,当我执行rabbitmq-server start启动命令,出现以下错误信息:
Starting rabbitmq-server: FAILED - check /var/log/rabbitmq/startup_{log, _err}
rabbitmq-server.
[root@vm ~]# rabbitmqctl list_queues
Listing queues ...
Error: unable to connect to node 'rabbit@vm': nodedown
DIAGNOSTICS
===========
nodes in question: ['rabbit@vm']
hosts, their running nodes and ports:
- vm10-11-0-63: [{rabbitmqctl64853,8196}]
current node details:
- node name: 'rabbitmqctl64853@vm'
- home dir: /var/lib/rabbitmq
- cookie hash: nlr2eMs6bmizAorhY8mEkw==
ERROR信息:
我通过上述信息去查看错误日志 /var/log/rabbitmq/startup_log 得到以下错误信息:
Error description:
{could_not_start,rabbit,
{bad_return,
{{rabbit,start,[normal,[]]},
{'EXIT',
{rabbit,failure_during_boot,
{could_not_start_tcp_listener,{"::",5672}}}}}}}
根据错误信息,查询了相关资料发现:发生的事情是你最终得到一个糟糕的队列数据库(无论出于何种原因 - 突然断电,其他一些进程接触文件),rabbitmq无法解析,因此它崩溃了.清除消息队列后,它可以正常工作.
解决思路
进入mnesia文件夹,查看当前的msg_store_transient、queues是否存在文章来源:https://www.toymoban.com/news/detail-606350.html
# 执行
mv msg_store_transient msg_store_transient.test
mv queues queues.test
再次重启rabbitmq服务,Success 成功拉起文章来源地址https://www.toymoban.com/news/detail-606350.html
到了这里,关于Rabbitmq 无法启动的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!