inets crashing in R10B-6

Serge Aleynikov serge@REDACTED
Sat Jun 25 00:37:17 CEST 2005


I set up a trace on gen_tcp:listen, and see that httpd is trying to bind 
to inet6, which is indeed the root of this problem on this host:

5> dbg:tracer().
{ok,<0.47.0>}
6> dbg:p(all,call).
{ok,[{matched,nonode@REDACTED,25}]}
7> dbg:tpl(httpd_transport, listen, dbg:fun2ms(fun(_) -> return_trace() 
end)).
{ok,[{matched,nonode@REDACTED,0},{saved,1}]}
8> dbg:tpl(gen_tcp, listen, dbg:fun2ms(fun(_) -> return_trace() end)). 

{ok,[{matched,nonode@REDACTED,1},{saved,1}]}
9> httpd:start_link(["../priv/inets.conf"]).
(<0.59.0>) call 
gen_tcp:listen(8080,[inet6,{ip,any},{packet,0},{active,false},{backlog,128},{reuseaddr,true}])
(<0.59.0>) returned from gen_tcp:listen/2 -> {error,eafnosupport}
** exited: shutdown **

How can I force httpd not to use inet6?  Did some default setting change 
in R10B-6?  I see this statement in the release notes, but not sure if 
it is related:

   OTP-5576 When doing an inet6 name lookup on an IPv4 address it was
            possible to get an address on IPv4 format back. This has been
	   corrected. Some other minor inconsistencies regarding IPv6
	   name lookup have also been corrected.

Thanks,

Serge

Serge Aleynikov wrote:
> Hi,
> 
> I upgraded Erlang to R10B-6 and for some reason inets keeps crashing at 
> startup.  Before upgrading it worked under R10B-5 with no problems.
> 
>  >erl
> Erlang (BEAM) emulator version 5.4.8 [source] [hipe] [threads:0]
> 
> Eshell V5.4.8  (abort with ^G)
> 1>httpd:start_link(["../priv/inets.conf"]).
> 
> =SUPERVISOR REPORT==== 24-Jun-2005::17:58:36 ===
>      Supervisor: {local,httpd_instance_sup_8080}
>      Context:    start_error
>      Reason:     {{listen,eafnosupport},
>                   {child,undefined,
>                          {httpd_acceptor,any,8080},
>                          {httpd_acceptor,
>                              start_link,
>                              [<0.66.0>,
>                               ip_comm,
>                               any,
>                               8080,
>                               httpd_conf_8080,
>                               silence]},
>                          permanent,
>                          1000,
>                          worker,
>                          [httpd_acceptor]}}
> ...
> 
> Here is the content of "../priv/inets.conf":
> ------BEGIN---------
> BindAddress    *
> Port           8080
> ServerName     wwwproxy
> 
> ServerRoot     ../priv
> DocumentRoot   ../priv/docroot
> Modules        mod_alias mod_auth mod_actions mod_include mod_dir 
> mod_get mod_head
> 
> DirectoryIndex index.html
> 
> ErlScriptAlias /erl io io_lib server_mgr
> ------END---------
> 
> Any idea how to configure it in order to avoid this 
> {listen,eafnosupport} "address family not supported by protocol family" 
> error?
> 
> Serge
> 

-- 
Serge Aleynikov
R&D Telecom, IDT Corp.
Tel: (973) 438-3436
Fax: (973) 438-1464
serge@REDACTED



More information about the erlang-questions mailing list