Bug 11030 - Listen <hostname>: double bind
Summary: Listen <hostname>: double bind
Status: CLOSED FIXED
Alias: None
Product: Apache httpd-2
Classification: Unclassified
Component: Core (show other bugs)
Version: 2.0.39
Hardware: Sun other
: P3 normal (vote)
Target Milestone: ---
Assignee: Apache HTTPD Bugs Mailing List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-07-22 08:53 UTC by Frodo Looijaard
Modified: 2004-11-16 19:05 UTC (History)
0 users



Attachments
Truss log (168.03 KB, text/plain)
2002-07-22 09:00 UTC, Frodo Looijaard
Details
patch (1.29 KB, patch)
2002-07-24 03:30 UTC, David Shane Holden
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Frodo Looijaard 2002-07-22 08:53:45 UTC
`Listen IPADDR' works fine; `Listen HOSTNAME' not. It seems Apache tries to 
bind twice in this last case, and crashes without even writing something to the 
Errorlog (it seemt to try to write to stderr, though).

See the attached output of `truss -f -a -e -vall -rall -wall bin/apachectl 
start > /tmp/out.txt 2>&1'. Line 1774 and line 2989 try the same bind; the 
second one fails of course.

We use Solaris 2.8 (it also occurred for 2.0.36 in Solaris 
2.6); /etc/nsswitch.conf contains `hosts: files dns' and the problem occurs 
both when the hostname aplux11-a is in /etc/hosts and when it is not (it is 
always in DNS).
Comment 1 Frodo Looijaard 2002-07-22 09:00:38 UTC
Created attachment 2435 [details]
Truss log
Comment 2 David Shane Holden 2002-07-24 03:30:59 UTC
Created attachment 2461 [details]
patch
Comment 3 Jeff Trawick 2002-07-31 12:47:05 UTC
A fix for this was just committed and will be in the next release of Apache.

Thanks for the report, and thanks for using Apache!

Thanks especially to Mr. Holden, whose debugging and initial patch pointed
out the problem.