You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by "Fenlason, Josh" <jf...@ptc.com> on 2005/12/28 22:28:13 UTC

Apache 2.2.0 Listen Directive

I'm running into an issue where Apache 2.2.0 on AIX won't start if there
is more than one Listen directive.  According to the documentation, this
should not be so.  This is not the case on Solaris.  This is causing
problems with regards to configuring ssl.  Has anyone else seen this?
Thanks in advance.
,
Josh.

Re: Apache 2.2.0 Listen Directive

Posted by Graham Leggett <mi...@sharp.fm>.
Fenlason, Josh wrote:

> I'm running into an issue where Apache 2.2.0 on AIX won't start if there 
> is more than one Listen directive.  According to the documentation, this 
> should not be so.  This is not the case on Solaris.  This is causing 
> problems with regards to configuring ssl.  Has anyone else seen this?  

I've had hassles in the past where httpd is asked to Listen multiple 
times to ultimately the same port, and httpd dies saying "cannot bind to 
IP address".

Make sure you don't have something like this anywhere in your config:

Listen 443
Listen xx.xx.xx.xx:443

Regards,
Graham
--

Re: Apache 2.2.0 Listen Directive

Posted by Jeff Trawick <tr...@gmail.com>.
On 12/28/05, Jeff Trawick <tr...@gmail.com> wrote:
> On 12/28/05, Fenlason, Josh <jf...@ptc.com> wrote:
> >
> > I'm running into an issue where Apache 2.2.0 on AIX won't start if there is
> > more than one Listen directive.

> Can you send me truss of startup using the failure configuration?
>
> truss -o /tmp/startup -f bin/apachectl start

(trace received offline)

I don't see any socket errors.  I jumped more than half-way to a
conclusion from your initial report ("won't start") and assumed that
some sort of bind error occurred.  It seems somewhat likely that a
crash is occurring, though I don't see SIGSEGV being reported in the
trace.  Anything written to the console by "apachectl start"?  What is
exit status of "apachectl start" in the failure?

# bin/apachectl start
# echo $?

Anything written to error log?

AIX 5.1 doesn't have IPV6_V6ONLY socket option (added in 5.2), which
does affect processing of sockets.  Can you try this hack?

Index: server/listen.c
===================================================================
--- server/listen.c     (revision 360100)
+++ server/listen.c     (working copy)
@@ -408,11 +408,8 @@
             if (previous != NULL
                 && IS_INADDR_ANY(lr->bind_addr)
                 && lr->bind_addr->port == previous->bind_addr->port
-                && IS_IN6ADDR_ANY(previous->bind_addr)
-                && apr_socket_opt_get(previous->sd, APR_IPV6_V6ONLY,
-                                      &v6only_setting) == APR_SUCCESS
-                && v6only_setting == 0) {
-
+                && IS_IN6ADDR_ANY(previous->bind_addr)) {
+                /* hacked to ignore IPV6_V6ONLY setting */
                 /* Remove the current listener from the list */
                 previous->next = lr->next;
                 continue;

Re: Apache 2.2.0 Listen Directive

Posted by Jeff Trawick <tr...@gmail.com>.
On 12/28/05, Fenlason, Josh <jf...@ptc.com> wrote:
>
> I'm running into an issue where Apache 2.2.0 on AIX won't start if there is
> more than one Listen directive.

Does it get better if you code

Listen 0.0.0.0:port1
Listen 0.0.0.0:port2
?

What version of AIX (unclear that it matters)?

Can you send me truss of startup using the failure configuration?

truss -o /tmp/startup -f bin/apachectl start