我的 RabbitMQ 曾经在我的 Ubuntu 16.04 LTS 服务器上运行良好,但突然它拒绝启动。
该服务器的主机名是canvas1
。
我使用标准 apt-get 方法安装它:
sudo apt-get update
sudo apt-get install rabbitmq-server
我尝试sudo rm -rf /var/log/rabbitmq/*
过此主题但这并没有什么帮助。
我已尝试过sudo rm -rf /var/lib/rabbitmq/mnesia/*
重新启动,但是没有作用。
我也尝试过添加127.0.0.0 canvas1
到/etc/hosts
,并添加export ERL_EPMD_ADDRESS=127.0.0.1
到/etc/default/rabbitmq-server
,但都没有起作用。
我尝试卸载 rabbitmq-server、清除它并自动删除和自动清除,然后重新安装 rabbitmq-server,但同样不起作用。
以下是显示的日志sudo service rabbitmq-server status
:
● rabbitmq-server.service - RabbitMQ Messaging Server
Loaded: loaded (/lib/systemd/system/rabbitmq-server.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Mon 2019-05-20 16:00:11 CST; 7s ago
Process: 5830 ExecStop=/usr/sbin/rabbitmqctl stop (code=exited, status=2)
Process: 5523 ExecStartPost=/usr/lib/rabbitmq/bin/rabbitmq-server-wait (code=exited, status=0/SUCCESS)
Process: 5522 ExecStart=/usr/sbin/rabbitmq-server (code=exited, status=1/FAILURE)
Main PID: 5522 (code=exited, status=1/FAILURE)
May 20 16:00:11 canvas1 rabbitmq[5830]: * epmd reports: node 'rabbit' not running at all
May 20 16:00:11 canvas1 rabbitmq[5830]: no other nodes on canvas1
May 20 16:00:11 canvas1 rabbitmq[5830]: * suggestion: start the node
May 20 16:00:11 canvas1 rabbitmq[5830]: current node details:
May 20 16:00:11 canvas1 rabbitmq[5830]: - node name: 'rabbitmq-cli-5838@canvas1'
May 20 16:00:11 canvas1 rabbitmq[5830]: - home dir: .
May 20 16:00:11 canvas1 rabbitmq[5830]: - cookie hash: KCGs/YQo59BuMnMdMM416A==
May 20 16:00:11 canvas1 systemd[1]: rabbitmq-server.service: Control process exited, code=exited status=2
May 20 16:00:11 canvas1 systemd[1]: rabbitmq-server.service: Unit entered failed state.
May 20 16:00:11 canvas1 systemd[1]: rabbitmq-server.service: Failed with result 'exit-code'.
以及内容在/var/log/rabbitmq/startup_log
:
BOOT FAILED
===========
Error description:
noproc
Log files (may contain more information):
/var/log/rabbitmq/[email protected]
/var/log/rabbitmq/[email protected]
Stack trace:
[{gen,do_for_proc,2,[{file,"gen.erl"},{line,228}]},
{gen_event,rpc,2,[{file,"gen_event.erl"},{line,239}]},
{rabbit,ensure_working_log_handlers,0,
[{file,"src/rabbit.erl"},{line,697}]},
{rabbit,'-boot/0-fun-0-',0,[{file,"src/rabbit.erl"},{line,328}]},
{rabbit,start_it,1,[{file,"src/rabbit.erl"},{line,356}]},
{init,start_em,1,[]},
{init,do_boot,3,[]}]
=INFO REPORT==== 20-May-2019::16:00:09.809084 ===
Error description:
noproc
Log files (may contain more information):
/var/log/rabbitmq/[email protected]
/var/log/rabbitmq/[email protected]
Stack trace:
[{gen,do_for_proc,2,[{file,"gen.erl"},{line,228}]},
{gen_event,rpc,2,[{file,"gen_event.erl"},{line,239}]},
{rabbit,ensure_working_log_handlers,0,
[{file,"src/rabbit.erl"},{line,697}]},
{rabbit,'-boot/0-fun-0-',0,[{file,"src/rabbit.erl"},{line,328}]},
{rabbit,start_it,1,[{file,"src/rabbit.erl"},{line,356}]},
{init,start_em,1,[]},
{init,do_boot,3,[]}]
{"init terminating in do_boot",noproc}
以及内容在/var/log/rabbitmq/startup_err
:
init terminating in do_boot (noproc)
Crash dump is being written to: erl_crash.dump...done
并且没有。中的所有文件都是和。/var/log/rabbitmq/[email protected]
/var/log/rabbitmq/
startup_log
startup_err
两者都没有 dets 文件/var/lib/rabbitmq/mnesia
。只有一个 pid 文件,并且没有具有该 pid 的进程。
可以erl_crash.dump
在这里找到:https://drive.google.com/file/d/1aRSQ-DXkMUZr2domAB-oc6AbeI6-y07c/view?usp=sharing
我怎么解决这个问题?
答案1
看起来 RabbitMQ 不能很好地与 Ubuntu 上的 esl-erlang 配合使用,但我不知道原因。
完全卸载 RabbitMQ 和 esl-erlang 后,仅重新安装 RabbitMQ,一切即可正常运行。