httpd-test-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Justin Erenkrantz <>
Subject Listen<port> is invalid
Date Wed, 23 Feb 2005 06:52:57 GMT
No idea why I'm suddenly hitting this, but in preparation for 2.1.3, I spent 
another one of my patented hours searching for bugs in httpd that end up being 
bugs in the perl-framework tests.  =(

perl-framework generates Listen directives in the order of:

For me, this causes errors like:
(48)Address already in use: make_sock: could not bind to address
no listening sockets available, shutting down
Unable to open logs

On Mac OS X 10.3.8 (7.8.0 via uname -r), getaddrinfo() without AI_PASSIVE can 
return duplicate IP addresses.  This leads to the error condition that causes 
the failure.  And, based on my reading of the docs, I'm not sure that's 
patently incorrect behavior on Darwin's part: that's for both the 
localhost and the network card.

The issue with this is that wildcard IP addresses aren't really supposed to be 
explicit in Listen statements.  httpd has a bunch of logic for inferring the 
right IP wildcards - trying to out-guess can lead to real badness. 
Specifically, this mucks with APR's ability to set AI_PASSIVE - which is 
required for use with address that we will later call bind() on - i.e. our 
listeners.  So, Listen with an IP address should only be used for real 

Manually changing httpd-test's Listen statements to just 'Listen <port>' allow 
me to run the tests correctly.

I don't have a clue how to change that in the Perl code though...

Thanks.  -- justin

View raw message