httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Barry Scott <barry.sc...@onelan.co.uk>
Subject Re: [users@httpd] HTTPD 2.2.17 issue on Fedora 15 with listening on IPv4
Date Wed, 13 Jul 2011 10:58:13 GMT
On Wednesday 13 July 2011 01:24:34 Jeff Trawick wrote:
> On Mon, Jul 11, 2011 at 8:21 AM, Barry Scott <barry.scott@onelan.co.uk> wrote:
> > We are porting our application to Fedora 15 and to systemd from SysV init.
> > The httpd configuraturation we are using work without problem on earlier
> > Fedora 13 systems.
> >
> > We are hitting an odd problem with httpd handling requests on localhost:80
> > over IPv4. The configuration allows access without authenication but we
> > get a 401 error. However repeat the request using IPv6 and it it works.
> >
> > If we restart httpd (systemctl restart httpd.service) the problem goes
> > away. We have a set of identical hardware running identical software
> > with identical config and not all systems show this problem. Leading me
> > to expect its a race condition during startup.
> >
> > Here is a fragment of the httpd.conf file:
> >
> > <VirtualHost 127.0.0.1:80 [::1]:80>
> >    ... rewrite rules ...
> >    <Location /XML>
> >
> >        #+ localhost auth file
> >        Order allow,deny
> >        Allow from 127.0.0.1
> >        Allow from ::1
> >        Satisfy Any
> >        #- localhost auth file
> >
> >    </Location>
> >    ...
> > </VirtualHost>
> >
> > I test this with:
> >
> > curl -4 http://localhost:80/XML/
> > curl -6 http://localhost:80/XML/
> 
> How does the client IP address show up in error and access logs?

I'm in the middle of instrumenting the code to find out what is going on.
I've attached an edited log show httpd coming up during boot and failing
followed by systemctl restart httpd.service after boot.
The attached log is the stdout from systemd starting httpd.service.

I have also made a change to the config to use port _default_:8080 for
the public facing server and 127.0.0.1:80 for the internal facing server.
With that change httpd will not start up.

You can see the failure log:

[823] info: [Tue Jul 12 17:51:43 2011] [error] (EAI 9)Address family for hostname not supported:
Could not resolve host name 127.0.0.1 -- ignoring!

The lines with QQQ on them are my instrumentation. I've patched
httpd-2.2.17/server/vhost.c and apr-1.4.5/network_io/unix/sockaddr.c.

The instrumentation seems to show me that the httpd and apr code
is fine.

My next step is to instument glibc getaddrinfo to find out why it
returns EAI_ADDRFAMILY. Have you seen issues with getaddrinfo
elsewhere?

We are using kernel-PAE-2.6.38.8-93.fc15.i686 and glibc-2.14-2.i686

I can provide the patches and full config if that is useful.

Barry


Mime
View raw message