[erlang-questions] SSL Example does not work

Roger Wenham <>
Sat Feb 20 12:59:25 CET 2016


Hi Magnus,

I did the ssl:start() as you suggested, and it now appears to work. So 
why is that necessary?

The program calls:

    application:start(ssl),

which I presume would cause ssl:start() to be called... Why is that not 
enough?

Also, is it ok to put the ssl:start() inside the program, and why wasn't 
that done?

Lastly, Vimal Kumar suggested I use application:ensure_all_started(ssl), 
would that remove the need for the ssl:start() ?

Sorry for all the questions :-)

Regards

Roger

On 19/02/16 16:31, Magnus Henoch wrote:
> You need to run ssl:start() before starting the example.
>
> Regards,
> Magnus
>
> On Fri, Feb 19, 2016 at 2:55 PM, Roger Wenham < 
> <mailto:>> wrote:
>
>     Hi,
>     Having had some difficulty writing a TLS server, I decided to run
>     the example in the sources for SSL
>     (...//erlang/lib/ssl-7.2/examples//...) and to my surprise, it
>     fails also.
>
>     What I get is:
>
>     Erlang/OTP 18 [erts-7.2.1] [source] [64-bit] [smp:8:8]
>     [async-threads:10] [hipe] [kernel-poll:false]
>
>     Eshell V7.2.1  (abort with ^G)
>
>     1> client_server:start().
>     ** exception exit: {noproc,{gen_server,call,
>     [ssl_listen_tracker_sup,
>     {start_child,[#Port<0.748>,
>     [{active,false},
>     {packet_size,0},
>     {packet,0},
>     {header,0},
>     {mode,list}],
>     {ssl_options,tls,
>     [{3,3},{3,2},{3,1}],
>     verify_peer,undefined,#Fun<ssl.9.76101806>,true,false,
>     undefined,2,<<"/opt/local/lib/erlang/li"...>>,undefined,
>     <<"/opt/local/lib/e"...>>,undefined,[],undefined,<<...>>,...}]},
>        infinity]}}
>          in function  gen_server:call/3 (gen_server.erl, line 212)
>          in call from ssl:listen/2 (ssl.erl, line 155)
>          in call from client_server:start/0 (client_server.erl, line 35)
>
>     I have tried this on several platforms, and the failure appears to
>     be the same...
>
>     I checked back trough the archive for the last few months, but no
>     joy...
>
>     Anyone have any idea about what I'm doing wrong?
>
>     Thanks
>
>     Roger
>
>
>
>     _______________________________________________
>     erlang-questions mailing list
>      <mailto:>
>     http://erlang.org/mailman/listinfo/erlang-questions
>
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20160220/a829b105/attachment.html>


More information about the erlang-questions mailing list