Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 25 May 2011 21:16:49 +0200
From:      Nick Rosier <nick.rosier@gmail.com>
To:        Jeremy Chadwick <freebsd@jdc.parodius.com>
Cc:        freebsd-apache@freebsd.org
Subject:   Re: IPv6 broken with Apache 2.2.19
Message-ID:  <BANLkTikzDPv1mYk4FCzxZxc0gozbb-kbTQ@mail.gmail.com>
In-Reply-To: <20110525181709.GA45908@icarus.home.lan>
References:  <BANLkTin77yrnV_CJygm9huFOYZZxKS=QUQ@mail.gmail.com> <20110525181709.GA45908@icarus.home.lan>

next in thread | previous in thread | raw e-mail | index | archive | help
On 25 May 2011 20:17, Jeremy Chadwick <freebsd@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". =A0Assuming this is coming from socket(2), tha=
t
> correlates with:
>
> =A0[EPERM] =A0 =A0 =A0 =A0 =A0 =A0User has insufficient privileges to car=
ry out the
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 requested operation.
>
> Do you have firewall rules or anything like that on this system? =A0Is th=
e
> network interface actually up/usable at this point? =A0Some 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. =A0The error check is on line 323, and puts focus on APR
> not so much Apache (httpd):
>
> 311 =A0 =A0 =A0 =A0 status =3D apr_socket_create(&new->sd, new->bind_addr=
->family,
> 312 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =
=A0 SOCK_STREAM, 0, process->pool);
> 313
> 314 #if APR_HAVE_IPV6
> 315 =A0 =A0 =A0 =A0 /* What could happen is that we got an IPv6 address, =
but this system
> 316 =A0 =A0 =A0 =A0 =A0* doesn't actually support IPv6. =A0Try the next a=
ddress.
> 317 =A0 =A0 =A0 =A0 =A0*/
> 318 =A0 =A0 =A0 =A0 if (status !=3D APR_SUCCESS && !addr &&
> 319 =A0 =A0 =A0 =A0 =A0 =A0 new->bind_addr->family =3D=3D APR_INET6) {
> 320 =A0 =A0 =A0 =A0 =A0 =A0 continue;
> 321 =A0 =A0 =A0 =A0 }
> 322 #endif
> 323 =A0 =A0 =A0 =A0 if (status !=3D APR_SUCCESS) {
> 324 =A0 =A0 =A0 =A0 =A0 =A0 ap_log_perror(APLOG_MARK, APLOG_CRIT, status,=
 process->pool,
> 325 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 "alloc_listener: =
failed to get a socket for %s",
> 326 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 addr);
> 327 =A0 =A0 =A0 =A0 =A0 =A0 return "Listen setup failed";
> 328 =A0 =A0 =A0 =A0 }
>
> 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.
>
>> =A0# 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=3Dlog
>
> --
> | Jeremy Chadwick =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0=
 =A0 =A0 =A0 jdc@parodius.com |
> | Parodius Networking =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 http://=
www.parodius.com/ |
> | UNIX Systems Administrator =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0Mountain =
View, CA, USA |
> | Making life hard for others since 1977. =A0 =A0 =A0 =A0 =A0 =A0 =A0 PGP=
 4BD6C0CB |
>
>



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?BANLkTikzDPv1mYk4FCzxZxc0gozbb-kbTQ>