erlanginets

How to get more information about error when starting Inets httpd?


I started Inets http with:

> inets:start(httpd, [{port, 8060}, {server_name, "myserver"},
> {server_root, "/Users/jonas/code"},                         
> {document_root, "/Users/jonas/code/mydocs"},             
> {bind_address, {192, 168, 2, 5}}]).                         
{error,inets_not_started}

so the only error information I have is {error,inets_not_started}. Is there any way I can get more information on what went wrong?


Solution

  • First, to solve your problem just start inets application (error reason indicates it is not started) by:

    inets:start().
    

    Second, in general starting SASL application improves a bit readability of Erlang/OTP errors/crashes - but it is not the case here.