[erlang-questions] ssl:connect fail

Éric Pailleau eric.pailleau@REDACTED
Sat Nov 28 18:51:57 CET 2015


Hi,
Remind that a release come with the only needed  applications and modules,  while shell can have access to the whole Erlang applications and modules.
But it is not magic. Your  .app file must declare things.
See 'app' in Erlang documentation. 
'application' key must declare all  modules and applications needed by your own application, in order to relx build a valid start script.

Regards 

Le 28 nov. 2015 12:26 PM, Technion <technion@REDACTED> a écrit :
>
> Hi,
>
>
> I was wondering if I could get some assistance with an application I'm building.
>
>
> Up until now, I've been running development starting it with:
>
>
> ./rebar3 shell
>
>
> This works (although the app isn't finished). It starts my gen_server automatically and I can sit there watching the debug logging run (which seems to be more than the documented "Run shell with project apps in path"). I also have a series of eunit tests that run fine, and xref doesn't complain.
>
>
> However, attempting to turn this into a release and start it seems to fail:
>
>
> $ ./rebar3 release
>
> $ /home/technion/ct_advisor/_build/default/rel/ct_advisor/bin/ct_advisor console
> Exec: /usr/lib/erlang/erts-7.1/bin/erlexec -boot /home/technion/ct_advisor/_build/default/rel/ct_advisor/releases/0.1.0/ct_advisor -boot_var ERTS_LIB_DIR /usr/lib/erlang/erts-7.1/../lib -config /home/technion/ct_advisor/_build/default/rel/ct_advisor/releases/0.1.0/sys.config -args_file /home/technion/ct_advisor/_build/default/rel/ct_advisor/releases/0.1.0/vm.args -- console
> Root: /home/technion/ct_advisor/_build/default/rel/ct_advisor
> /home/technion/ct_advisor/_build/default/rel/ct_advisor
> Erlang/OTP 18 [erts-7.1] [source] [64-bit] [smp:2:2] [async-threads:30] [hipe] [kernel-poll:true]
>
> 11:15:08.781 [info] Application lager started on node ct_advisor@REDACTED
> 11:15:08.799 [error] gen_server <0.79.0> terminated with reason: {'module could not be loaded',[{ssl,connect,["ct.googleapis.com",443,[{nodelay,true},binary,{active,false}],30000],[]},{ibrowse_http_client,send_req_1,8,[{file,"/home/technion/ct_advisor/_build/default/lib/ibrowse/src/ibrowse_http_client.erl"},{line,758}]},{gen_server,try_handle_call,4,[{file,"gen_server.erl"},{line,629}]},{gen_server,handle_msg,5,[{file,"gen_server.erl"},{line,661}]},{proc_lib,init_p_do_apply,3,[{file,"proc_lib.erl"},{line,240}]}]}
>
> ... lots of stuff snipped.
>
>
>
> The failure here appears to be within ibrowse, so I'm expecting it's not a code error. It also appears to feel ssl:connect doesn't load.
>
>
> There are lots of Google hits for this type of error, suggesting Erlang wasn't built with SSL support. But I have eunit tests that actually run ibrowse (to https: addresses) and they work. And the whole thing runs when run from within a shell.
>
>
> I'm totally lost as to why a release (which seems to build fine) would be magically different.
>
>
> Version information:
>
> $ ./rebar3 -v
> rebar 3.0.0-beta.4+build.188.ref73c3c55 on Erlang/OTP 18 Erts 7.1
>
>
> Any assistance appreciated.
>


More information about the erlang-questions mailing list