[erlang-questions] Node Crash for inets config 'SocketType ssl'
Prakash Parmar
prakash.parmar@REDACTED
Wed Jul 11 07:12:31 CEST 2018
Hello Ingela,
Thanks for your response ?
I'm using rebar3 for release. I have mentioned ssl application in config file prior to inets application(though sequence doesn't matter) and as per my understanding rebar3 will take care of start sequence and I don't think so there is an option to define application start sequence explicitly. Am I right ?
Let me know if there is any way to make sure to start ssl application before inets application.
/Cheers,
Prakash Parmar
________________________________
From: Ingela Andin <ingela.andin@REDACTED>
Sent: Tuesday, July 10, 2018 9:33:50 PM
To: Prakash Parmar
Cc: Erlang Questions
Subject: Re: [erlang-questions] Node Crash for inets config 'SocketType ssl'
Hi!
Did you start the ssl application?
Regards Ingela Erlang/OTP Team - Ericsson AB
2018-07-10 8:21 GMT+02:00 Prakash Parmar <prakash.parmar@REDACTED<mailto:prakash.parmar@REDACTED>>:
Hello,
I have a web-server based on inets otp application and running completely fine over 'http' in order to support 'https' I have changed inets configuration
as per the sample configuration located at Erlang's repo [1].
Here are the config file snippet I had changed/added,
...
SocketType ssl
SSLCertificateFile {{install_dir}}/config/www/certs/server.pem
SSLCertificateKeyFile {{install_dir}}/config/www/certs/server.pem
SSLVerifyClient 0
...
I have also generated certificate files[2] and kept it in above mentioned path.
unfortunately node is crashing at startup and following logs is printed on shell.
=CRASH REPORT==== 9-Jul-2018::12:13:50 ===
crasher:
initial call: application_master:init/4
pid: <0.902.0>
registered_name: []
exception exit: {{shutdown,
{failed_to_start_child,httpd_sup,
{shutdown,
{failed_to_start_child,
{httpd_instance_sup,any,8881,default},
{shutdown,
{failed_to_start_child,
{httpd_acceptor_sup,any,8881,default},
{shutdown,
{failed_to_start_child,
{httpd_acceptor_sup,any,8881,default},
{'EXIT',
{function_clause,
[{http_transport,start,
[ssl],
[{file,"http_transport.erl"},{line,54}]},
{httpd_acceptor,do_socket_start,1,
[{file,"httpd_acceptor.erl"},{line,101}]},
{httpd_acceptor,do_init,4,
[{file,"httpd_acceptor.erl"},{line,94}]},
{httpd_acceptor,acceptor_init,8,
[{file,"httpd_acceptor.erl"},{line,82}]},
{proc_lib,init_p_do_apply,3,
[{file,"proc_lib.erl"},
{line,247}]}]}}}}}}}}}},
{inets_app,start,[normal,[]]}}
in function application_master:init/4 (application_master.erl, line 134)
ancestors: [<0.901.0>]
messages: [{'EXIT',<0.903.0>,normal}]
links: [<0.901.0>,<0.739.0>]
dictionary: []
trap_exit: true
status: running
heap_size: 987
stack_size: 27
reductions: 166
neighbours:
Does anyone know what might be the problem ?
I have looked into 'http_transport' module's code and it seems that start/1 function[3] is not accepting 'ssl' atom as an arity,
Arity for this function is like {ssl, <Certificate_file_path>}. Any idea on this ? Did I missed anything ?
/ cheers,
Prakash Parmar
Reference,
[1] https://github.com/erlang/otp/blob/master/lib/inets/examples/server_root/conf/ssl.conf
https://github.com/erlang/otp/blob/master/lib/inets/examples/server_root/conf/httpd.conf
[2] https://devcenter.heroku.com/articles/ssl-certificate-self
https://stackoverflow.com/questions/991758/how-to-get-pem-file-from-key-and-crt-files
[3] https://github.com/erlang/otp/blob/177a3470d598c892e0b7251cd2d9219aebcd3747/lib/inets/src/http_lib/http_transport.erl#L54
_______________________________________________
erlang-questions mailing list
erlang-questions@REDACTED<mailto:erlang-questions@REDACTED>
http://erlang.org/mailman/listinfo/erlang-questions
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20180711/2444efaf/attachment.htm>
More information about the erlang-questions
mailing list