RabbitMQ啟動報錯throw:{error,{missing_dependencies,[crypto,ssl]
阿新 • • 發佈:2018-12-01
在啟動 rabbitmq-server 時報錯:
2018-01-03 06:16:32.494 [info] <0.33.0> Application lager started on node [email protected]
2018-01-03 06:16:32.507 [info] <0.5.0> Log file opened with Lager
2018-01-03 06:16:33.438 [error] <0.5.0>
Error description:
init:do_boot/3
init:start_em/1
rabbit:start_it/1 line 454
rabbit:broker_start/0 line 330
rabbit_plugins:prepare_plugins/1 line 289
rabbit_plugins:ensure_dependencies/1 line 263
throw:{error,{missing_dependencies,[crypto,ssl],
[amqp10_client,cowboy,cowlib,rabbitmq_aws,
rabbitmq_management,
rabbitmq_management_agent,rabbitmq_shovel,
rabbitmq_trust_store]}}
Log file(s) (may contain more information):
/home/zhangcs/rabbitmq_server-3.7.2/var/log/rabbitmq/ [email protected]
/home/zhangcs/rabbitmq_server-3.7.2/var/log/rabbitmq/[email protected]_upgrade.log
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
根據異常提示,原先以為是缺少了OpenSSL,但是檢查後發現OpenSSL已經成功安裝
$ openssl version
OpenSSL 1.0.2g 1 Mar 2016
通過搜尋引擎找了半天沒收穫,最後卻在官網找到了相關資訊:在 “Debian-based systems” 上,Erlang支援OpenSSL需要安裝 erlang-ssl ;而我當前的系統 Ubuntu16.04TLS 正屬於Debian系
If you receive an error instead, confirm that Erlang was built with OpenSSL. On Debian-based systems you may need to install the erlang-ssl package.
1、檢查當前Erlang是否支援TSL/SSL
進入Erlang後使用命令 ssl:versions().
檢查當前SSL版本
[email protected]:~/rabbitmq_server-3.7.2$ erl Erlang/OTP 20 [erts-9.1] [source] [64-bit] [smp:2:2] [ds:2:2:10] [async-threads:10] [kernel-poll:false] Eshell V9.1 (abort with ^G) 1> ssl:versions(). ** exception error: undefined function ssl:versions/0 2> halt().
2、安裝 erlang-ssl 後問題解決
$ sudo apt install erlang-ssl
- 1
安裝 erlang-ssl 後檢查SSL版本
[email protected]:~/rabbitmq_server-3.7.2$ erl
Erlang/OTP 18 [erts-7.3] [source] [64-bit] [smp:2:2] [async-threads:10] [kernel-poll:false]
Eshell V7.3 (abort with ^G)
1> ssl:versions().
[{ssl_app,"7.3"},
{supported,['tlsv1.2','tlsv1.1',tlsv1]},
{available,['tlsv1.2','tlsv1.1',tlsv1,sslv3]}]
2> halt().
啟動 rabbitmq-server 時不再報錯