RabbitMQ start error throw:{error,{missing_dependencies,[crypto,ssl]

Keywords: SSL Erlang OpenSSL Ubuntu

Error when starting rabbitmq-server:

2018-01-03 06:16:32.494 [info] <0.33.0> Application lager started on node rabbit@ubuntu
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/rabbit@ubuntu.log
   /home/zhangcs/rabbitmq_server-3.7.2/var/log/rabbitmq/rabbit@ubuntu_upgrade.log

According to the exception, it was thought that OpenSSL was missing, but after checking, it was found that OpenSSL had been successfully installed.

$ openssl version
OpenSSL 1.0.2g  1 Mar 2016

After searching through search engines for half a day, I finally found relevant information on the official website: Erlang needs to install erlang-ssl to support OpenSSL on "Debian-based systems"; and my current system Ubuntu 16.04 TLS belongs to Debian system.

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. Check whether current Erlang supports TSL/SSL

After entering Erlang, use the command ssl:versions(). Check the current version of SSL

zhangcs@ubuntu:~/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. Problem Solution after erlang-ssl Installation

$ sudo apt install erlang-ssl

Check the SSL version after installing erlang-ssl

zhangcs@ubuntu:~/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().

No more error reporting when starting rabbitmq-server

Posted by bladecatcher on Fri, 08 Feb 2019 13:30:17 -0800