IPv6 broken with Apache 2.2.19

Nick Rosier nick.rosier at gmail.com
Wed May 25 19:16:50 UTC 2011


On 25 May 2011 20:17, Jeremy Chadwick <freebsd at jdc.parodius.com> wrote:
> On Wed, May 25, 2011 at 05:21:42PM +0200, Nick Rosier wrote:
>> Since the upgrade from Apache 2.2.17 to 2.2.19 I'm unable to get IPv6
>> to work; I keep getting following error:
>>
>> # grep Listen httpd.conf
>> Listen x.x.x.x:80
>> Listen [2001:x:x:x:x::1]:80
>>
>> # apachectl -t
>> [Wed May 25 17:18:18 2011] [crit] (OS 1)Unknown host: alloc_listener:
>> failed to set up sockaddr for [2001:x:x:x:x::1]
>> Syntax error on line 41 of /usr/local/etc/apache22/httpd.conf:
>> Listen setup failed
>>
>> Any ideas what I'm doing wrong?
>
> Assuming "OS 1" means errno 1 was returned, that's EPERM, which is
> "Operation not permitted".  Assuming this is coming from socket(2), that
> correlates with:
>
>  [EPERM]            User has insufficient privileges to carry out the
>                     requested operation.
>
> Do you have firewall rules or anything like that on this system?  Is the
> network interface actually up/usable at this point?  Some Linux folks
> have seen this problem (bug is still open):

This instance runs in a Jail. I disabled pf but the problem persists.
The interface is up and running (other services are binding to the
IPv6 instance) without problems.

> https://bugs.launchpad.net/ubuntu/+source/apache2/+bug/397393
>
> The Apache code in question which returns this error is in
> server/listen.c.  The error check is on line 323, and puts focus on APR
> not so much Apache (httpd):
>
> 311         status = apr_socket_create(&new->sd, new->bind_addr->family,
> 312                                     SOCK_STREAM, 0, process->pool);
> 313
> 314 #if APR_HAVE_IPV6
> 315         /* What could happen is that we got an IPv6 address, but this system
> 316          * doesn't actually support IPv6.  Try the next address.
> 317          */
> 318         if (status != APR_SUCCESS && !addr &&
> 319             new->bind_addr->family == APR_INET6) {
> 320             continue;
> 321         }
> 322 #endif
> 323         if (status != APR_SUCCESS) {
> 324             ap_log_perror(APLOG_MARK, APLOG_CRIT, status, process->pool,
> 325                           "alloc_listener: failed to get a socket for %s",
> 326                           addr);
> 327             return "Listen setup failed";
> 328         }
>
> The ChangeLog between Apache 2.2.17 and 2.2.19 indicates absolutely no
> changes were made WRT IPv6 code, so again that puts focus on APR.
>
>>  # pkg_info | grep apr
>> apr-ipv6-devrandom-gdbm-db42-1.4.5.1.3.12 Apache Portability Library
>
> The APR ChangeLog is filled with IPV6-related changes with 1.4.3, so the
> question here is basically "what APR version were you using before you
> upgraded"?
>
> http://www.apache.org/dist/apr/CHANGES-APR-1.4
>
> apr_socket_create() for *IX is in network_io/unix/sockets.c around line
> 91, so let's look via ViewVC to see who's touched things recently
> (though we have no idea what timeframe we should be looking at, since we
> don't know what APR version you were using before the upgrade):

Based on my logs I came from APR 1.4.3. I first noticed the problems
going to Apache 2.2.18 with APR 1.4.4. So I guess this started after
upgrade from 1.4.3 to 1.4.4

> http://svn.apache.org/viewvc/apr/apr/tags/1.4.5/network_io/unix/sockets.c?view=log
>
> --
> | Jeremy Chadwick                                   jdc at parodius.com |
> | Parodius Networking                       http://www.parodius.com/ |
> | UNIX Systems Administrator                  Mountain View, CA, USA |
> | Making life hard for others since 1977.               PGP 4BD6C0CB |
>
>


More information about the freebsd-apache mailing list