tech-net archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

connect to 0.0.0.0 vs ::



Hello,
while trying to understand what apache is doing with pipes and why it
could end up hanging:
http://mail-index.netbsd.org/current-users/2015/02/13/msg026686.html

I though that maybe it could be related to these messages in the
logs:
[Sat Feb 15 14:18:42 2014] [warn] (51)Network is unreachable: connect to listener on [::]:80
[Sat Feb 15 14:18:43 2014] [warn] (51)Network is unreachable: connect to listener on [::]:80
[Sat Feb 15 14:18:44 2014] [warn] (51)Network is unreachable: connect to listener on [::]:80
[Sat Feb 15 14:18:45 2014] [warn] (51)Network is unreachable: connect to listener on [::]:80
[Sat Feb 15 14:18:46 2014] [warn] (51)Network is unreachable: connect to listener on [::]:80

After more analisis of the apache code, it turns out the master
connects to its own listeing socket as a way to wake up one of its
childs (this is dummy_connection() in mpm_common.c, called from
ap_mpm_pod_signal() and ap_mpm_pod_killpg()). 

We have a different behavior for ipv4 and ipv6:
antioche:/tmp#telnet :: 80
Trying ::...
telnet: Unable to connect to remote host: Network is unreachable
antioche:/tmp#telnet 0.0.0.0 80
Trying 0.0.0.0...
Connected to 0.0.0.0.
Escape character is '^]'.

and this cause apache to fail to wake its childs (and eventually fill up the
pipe, causing the problem I'm seeing now). Is it expected behavior ?
On a linux system, both 0.0.0.0 and :: connects to localhost if
a socket has been open on these addresses.

-- 
Manuel Bouyer <bouyer%antioche.eu.org@localhost>
     NetBSD: 26 ans d'experience feront toujours la difference
--


Home | Main Index | Thread Index | Old Index