Updated to net-www/apache-2.0.48 with emerge -u world, ran etc-update - and tried to start the server - it failed with: "Protocol not available: make_sock: for address [::]:80, apr_socket_opt_set: (IPV6_V6ONLY)" After examining my make.conf and various conf files I found that the error was with /etc/apache2/conf/apache2.conf TO RESOLVE: The line in apache.conf "Listen 80" makes apache think that it should use ipv6 - change it to "Listen 0.0.0.0:80" and it starts as it should. Reproducible: Always Steps to Reproduce: Actual Results: Failed with: Protocol not available: make_sock: for address [::]:80, apr_socket_opt_set: (IPV6_V6ONLY) Expected Results: Apache2 should start Portage 2.0.49-r15 (default-x86-1.4, gcc-3.3.2, glibc-2.3.2-r8, 2.4.20-gentoo-r5) ================================================================= System uname: 2.4.20-gentoo-r5 i686 Pentium II (Deschutes) Gentoo Base System version 1.4.3.11 ACCEPT_KEYWORDS="x86 ~x86" AUTOCLEAN="yes" CFLAGS="-march=pentium2 -O3 -pipe" CHOST="i686-pc-linux-gnu" COMPILER="gcc3" CONFIG_PROTECT="/etc /usr/share/config /usr/kde/2/share/config /usr/kde/3/share/config /var/bind /usr/X11R6/lib/X11/xkb /var/qmail/control /var/qmail/alias" CONFIG_PROTECT_MASK="/etc/gconf /etc/env.d" CXXFLAGS="-march=pentium2 -O3 -pipe" DISTDIR="/usr/portage/distfiles" FEATURES="sandbox ccache autoaddcvs" GENTOO_MIRRORS="http://trumpetti.atm.tut.fi/gentoo/ http://ftp.gentoo.skynet.be/ http://gentoo.oregonstate.edu http://www.ibiblio.org/pub/Linux/distributions/gentoo" MAKEOPTS="-j2" PKGDIR="/usr/portage/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="/usr/local/portage" SYNC="rsync://rsync.gentoo.org/gentoo-portage" USE="oss foomaticdb mad xmms tcltk esd x86 -3dnow -apm -arts avi berkdb crypt cups curl encode firebird gd gdbm gif gpm gtk imap imlib java jpeg kde gnome -libg++ libwww mcal -mikmod maildir -mbox mmx motif mpeg mysql ncurses nls oggvorbis opengl pam pdflib png python perl qt -quicktime readline -sdl slang -spell ssl svga tcpd truetype X xml xml2 -xv zlib"
Will get to this.
*** Bug 32449 has been marked as a duplicate of this bug. ***
seemant could you reassign this bug please? This seems to be a configuration file change. It has its effects on /etc/apache2/conf/apache2.conf and for those who have installed ssl as well, it also affects /etc/apache2/conf/modules/40_mod_ssl.conf. Listen 80 should indeed be Listen 0.0.0.0:80. in the second file, changes are somewhat similar: Listen 0.0.0.0:443.
Mark, I will get to it.
Just a note, this doesn't even work when you have IPv6 network-wise enabled and in use.
Christian, could you just clarify that last comment for me please. Are you saying the proposed "fix" is good or bad?
I was trying to say that this error occurs when the machine is IPv6 enabled & connected. The fix "works", you just cannot connect via IPv6 per default then.
This is correct. If I have a box fully IPv6 enabled w. a global IPv6 address apache2 won't run if the IPv6 address is spec'd in the config file. # apache2 -V Server version: Apache/2.0.48 Server built: Nov 11 2003 22:12:30 Server's Module Magic Number: 20020903:4 Architecture: 32-bit Server compiled with.... -D APACHE_MPM_DIR="server/mpm/prefork" -D APR_HAS_SENDFILE -D APR_HAS_MMAP -D APR_HAVE_IPV6 (IPv4-mapped addresses enabled) -D APR_USE_SYSVSEM_SERIALIZE -D APR_USE_PTHREAD_SERIALIZE -D SINGLE_LISTEN_UNSERIALIZED_ACCEPT -D APR_HAS_OTHER_CHILD -D AP_HAVE_RELIABLE_PIPED_LOGS -D HTTPD_ROOT="/usr" -D SUEXEC_BIN="/usr/sbin/suexec2" -D DEFAULT_PIDLOG="/var/run/httpd.pid" -D DEFAULT_SCOREBOARD="logs/apache_runtime_status" -D DEFAULT_LOCKFILE="/var/run/accept.lock" -D DEFAULT_ERRORLOG="logs/error_log" -D AP_TYPES_CONFIG_FILE="/etc/apache2/conf/mime.types" -D SERVER_CONFIG_FILE="/etc/apache2/conf/apache2.conf" It looks like IPv6 is built into apache2. Other services on the box, such as sshd, run properly with IPv6, however if I put the local IPv6 address in the apache config file by adding Listen [3ffe:bc0:1d5:1::16]:80 to the config file, I get the following when I try to start apache: [Wed Nov 12 01:19:34 2003] [crit] (92)Protocol not available: make_sock: for address [3ffe:bc0:1d5:1::16]:80, apr_socket_opt_set: (IPV6_V6ONLY) no listening sockets available, shutting down It looks as if adding an explicit IPv4 address to the Listen directive is only a band-aid over an IPv6 problem.
The "fix" is indeed no good solution. I wanted to use apache2 because of the IPv6-support included, which apache1 does not have. I hope this gets fixed ASAP.
Is there anything done about this bug?
For what it's worth, this seems to be an upstream problem that crept in between 2.0.43 and 2.0.44. It's been noted by a few people in the debian-apache list. See, for instance <http://lists.debian.org/debian-apache/2003/debian-apache-200311/msg00109.html>. Here's a patch to listen.c for the apache source, as per this post, and it eliminates the error. I'll leave integrating it into gentoo for others. --- listen.c.orig 2003-12-08 23:03:52.000000000 -0600 +++ listen.c 2003-12-08 23:03:52.000000000 -0600 @@ -117,19 +117,6 @@ return stat; } -#if APR_HAVE_IPV6 - if (server->bind_addr->family == APR_INET6) { - stat = apr_socket_opt_set(s, APR_IPV6_V6ONLY, v6only_setting); - if (stat != APR_SUCCESS && stat != APR_ENOTIMPL) { - ap_log_perror(APLOG_MARK, APLOG_CRIT, stat, p, - "make_sock: for address %pI, apr_socket_opt_set: " - "(IPV6_V6ONLY)", - server->bind_addr); - apr_socket_close(s); - return stat; - } - } -#endif /* * To send data over high bandwidth-delay connections at full
Created attachment 21978 [details, diff] Fix for bsd-related ipv6 error As per <http://lists.debian.org/debian-apache/2003/debian-apache-200311/msg00109.html>, here is a fix for the apache 2.0.48 problem with Gentoo. # cd /usr/portage/net-www/apache # cp apache-2.0.48-r1.ebuild apache-2.0.48-r2.ebuild Add the following line to apache-2.0.48-r2.ebuild right under the line in src_unpack(): "patch -p1 <${FILESDIR}/apache-2.0.48-gentoo.diff || die" patch -p1 <${FILESDIR}/httpd-2.0.48-bsd-ipv6-fix.diff || die Copy the attached patch to files/httpd-2.0.48-bsd-ipv6-fix.diff # ebuild apache-2.0.48-r2.ebuild digest # emerge -u apache All should be well.... This should do until someone from Gentoo makes the fix official.
To confirm: The patch fixed the issue on my system. 450 Mhz Celeron. Setting up 0.0.0.0:[port] as the Listen did not work for me.
Patch applied. You shouldnt need the listen 0.0.0.0:80 for ipv6. Tested here works properly. Regards, chuck