Iman
Iman

Reputation: 414

Erlang can't connect to any HTTPS url

The problem arose when I was trying to build rebar3, but it couldn't fetch its dependencies from Amazon S3. Debugging into the problem I found out that the erlang runtime couldn't connect to any HTTPS site, although curl or wget work completely fine. When I set httpc:set_options([{verbose,trace}]), I get the following output:

    {failed_connect,
              [{to_address,{"s3.amazonaws.com",443}},
               {inet,
                   [inet],
                   {eoptions,
                       {undef,
                           [{ssl,connect,
                                ["s3.amazonaws.com",443,
                                 [binary,
                                  {active,false},
                                  {ssl_imp,new},
                                  inet],
                                 20000],
                                []},
                            {http_transport,connect,4,
                                [{file,"http_transport.erl"},{line,135}]},
                            {httpc_handler,connect,4,
                                [{file,"httpc_handler.erl"},{line,891}]},
                            {httpc_handler,
                                connect_and_send_first_request,3,
                                [{file,"httpc_handler.erl"},{line,905}]},
                            {httpc_handler,init,1,
                                [{file,"httpc_handler.erl"},{line,242}]},
                            {proc_lib,init_p_do_apply,3,
                                [{file,"proc_lib.erl"},{line,239}]}]}}}]}

Where can I look to find out what the problem is ?

Upvotes: 3

Views: 562

Answers (1)

Mickaël Rémond
Mickaël Rémond

Reputation: 9055

You are missing the ssl Erlang application. Some Linux distributions split Erlang into several subpackages. You should make sure that you have the package erlang-ssl installed on your system.

Upvotes: 2

Related Questions