[erlang-questions] Why I cannot start sasl from my app file application specification

Fred Hebert <>
Thu Aug 15 22:23:18 CEST 2013


That's because unless you do -boot sasl, start SASL manually (with
application:start/2) or have it started as part of a release, the SASL
application is not actually started, and all the config file does is
define variables to be loaded once it's started.

If everything went fine with one of the patches I sent the OTP team,
R16B02 should see the addition of application:ensure_all_started/1-2
functions that will boot both the application and all of its
dependencies, recursively. This will make your use case simpler.

Regards,
Fred.

On 08/15, Ivan Carmenates García wrote:
> Hi all,
> 
>  
> 
> I have this application specification for an application.
> 
>  
> 
> {application, x,
> 
> [{description,                   "x description"},
> 
>   {vsn, "1.0"},
> 
>   {modules, [x, x_sup, x_log]},
> 
>   {registered, [x, x_sup, x_log]},
> 
>   {applications, [kernel, stdlib, sasl]},
> 
>   {mod, {x, []}},
> 
>   {start_phases,                []}]}.
> 
>  
> 
> Then when I try to start the system I get this error.
> 
>  
> 
> application:start(x).
> 
>   {error,{not_started,sasl}
> 
>  
> 
> I also have this config file which I load with werl -config x.config
> 
>  
> 
>  
> 
> [{sasl, [
> 
>                 {sasl_error_logger, {file, "debug2.log"}},
> 
>                 {errlog_type, error},
> 
>                 %% define the parameters of the rotating log
> 
>                 %% the log file directory
> 
>                 {error_logger_mf_dir, "d:/WORK/x-1.0/error_logs/"},
> 
>                 %% # bytes per logfile
> 
>                 {error_logger_mf_maxbytes, 10485760}, % 10 MB
> 
>                 %% maximum number of logfiles
> 
>                 {error_logger_mf_maxfiles, 10}]},
> 
> {kernel, [
> 
>                 {error_logger, {file, "debug.log" }}]}
> 
> ].
> 
>  
> 
> If I start the sasl whether by hand in the console like this
> application:start(sasl) or by the command line werl -boot start_sasl 
  all
> work fine.
> 
> But not from the normal application specification which should be started
> from there according to the documentation.
> 
>  
> 
> Best regards,
> 
> Ivan.
> 
>  
> 

> _______________________________________________
> erlang-questions mailing list
> 
> http://erlang.org/mailman/listinfo/erlang-questions



More information about the erlang-questions mailing list