From owner-freebsd-apache@FreeBSD.ORG Wed May 25 18:17:12 2011 Return-Path: Delivered-To: freebsd-apache@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9659E1065675 for ; Wed, 25 May 2011 18:17:12 +0000 (UTC) (envelope-from jdc@koitsu.dyndns.org) Received: from qmta14.emeryville.ca.mail.comcast.net (qmta14.emeryville.ca.mail.comcast.net [76.96.27.212]) by mx1.freebsd.org (Postfix) with ESMTP id 7E3498FC16 for ; Wed, 25 May 2011 18:17:12 +0000 (UTC) Received: from omta21.emeryville.ca.mail.comcast.net ([76.96.30.88]) by qmta14.emeryville.ca.mail.comcast.net with comcast id ntek1g0061u4NiLAEuHBQX; Wed, 25 May 2011 18:17:11 +0000 Received: from koitsu.dyndns.org ([67.180.84.87]) by omta21.emeryville.ca.mail.comcast.net with comcast id nuH91g00u1t3BNj8huHAlM; Wed, 25 May 2011 18:17:10 +0000 Received: by icarus.home.lan (Postfix, from userid 1000) id 7E0B8102C19; Wed, 25 May 2011 11:17:09 -0700 (PDT) Date: Wed, 25 May 2011 11:17:09 -0700 From: Jeremy Chadwick To: Nick Rosier Message-ID: <20110525181709.GA45908@icarus.home.lan> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Cc: freebsd-apache@freebsd.org Subject: Re: IPv6 broken with Apache 2.2.19 X-BeenThere: freebsd-apache@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Support of apache-related ports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 May 2011 18:17:12 -0000 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): 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): http://svn.apache.org/viewvc/apr/apr/tags/1.4.5/network_io/unix/sockets.c?view=log -- | Jeremy Chadwick jdc@parodius.com | | Parodius Networking http://www.parodius.com/ | | UNIX Systems Administrator Mountain View, CA, USA | | Making life hard for others since 1977. PGP 4BD6C0CB |