ubuntu rabbit mq安装失败问题解决

问题描述

在Ubuntu下安装rabbitmq出现如下错误:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
BOOT FAILED
===========

Error description:
noproc

Log files (may contain more information):
/usr/local/rabbitmq/var/log/rabbitmq/rabbit@debian.log
/usr/local/rabbitmq/var/log/rabbitmq/rabbit@debian-sasl.log

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,856}]},
{rabbit,'-boot/0-fun-0-',0,[{file,"src/rabbit.erl"},{line,288}]},
{rabbit,start_it,1,[{file,"src/rabbit.erl"},{line,424}]},
{init,start_em,1,[]},
{init,do_boot,3,[]}]

=INFO REPORT==== 16-Jul-2018::17:53:51.191153 ===
Error description:
noproc

Log files (may contain more information):
/usr/local/rabbitmq/var/log/rabbitmq/rabbit@debian.log
/usr/local/rabbitmq/var/log/rabbitmq/rabbit@debian-sasl.log

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,856}]},
{rabbit,'-boot/0-fun-0-',0,[{file,"src/rabbit.erl"},{line,288}]},
{rabbit,start_it,1,[{file,"src/rabbit.erl"},{line,424}]},
{init,start_em,1,[]},
{init,do_boot,3,[]}]


{"init terminating in do_boot",noproc}
init terminating in do_boot (noproc)

Crash dump is being written to: erl_crash.dump...done

rabbitmq version: 3.6.15
erlang version: 21.0

问题解决

erlang支持rabbit mq3.7.7以上版本;
rabbit mq3.6.15 只能用 erlang20.x版本

于是用apt remove 命令卸载掉apt自动下载的版本

1
apt-get remove rabbitmq-server

用wget命令下载3.7.7版本

1
wget https://github.com/rabbitmq/rabbitmq-server/releases/download/v3.7.10/rabbitmq-server_3.7.10-1_all.deb

启动rabbitmq命令:

1
service rabbitmq-server start

查看状态

1
rabbitmqctl status

增加systemctl支持,设置开机自启动

1
2
3
systemctl enable rabbitmq-server
systemctl stop rabbitmq-server
systemctl start rabbitmq-server