Package: tomcat6
Severity: normal
Version: 6.0.18-3
Tags: patch
User: [email protected]
Usertags: origin-ubuntu ubuntu-patch jaunty

Debian bug #517163 and #521306 are about tomcat6 failing to start with
libtcnative-1 installed and ipv6 enabled, with the following error:

Socket bind failed: [22] Invalid argument

Those bugs were fixed on the tomcat-native side by bumping to the 1.1.16
release. However, according to the upstream bug[1] and my testing, this
also requires a patch to be applied to tomcat6 itself.

[1] https://issues.apache.org/bugzilla/show_bug.cgi?id=43327

Ubuntu applied the attached patch to fix this, please consider including
it in a future release. The patch was taken from upstream SVN and will
be part of 6.0.19 one day.

Thanks !

-- 
Thierry Carrez
diff -u tomcat6-6.0.18/debian/patches/series tomcat6-6.0.18/debian/patches/series
--- tomcat6-6.0.18/debian/patches/series
+++ tomcat6-6.0.18/debian/patches/series
@@ -4,0 +5 @@
+tcnative-ipv6-fix-43327.patch
only in patch2:
unchanged:
--- tomcat6-6.0.18.orig/debian/patches/tcnative-ipv6-fix-43327.patch
+++ tomcat6-6.0.18/debian/patches/tcnative-ipv6-fix-43327.patch
@@ -0,0 +1,15 @@
+Index: tomcat6-6.0.18/java/org/apache/tomcat/util/net/AprEndpoint.java
+===================================================================
+--- tomcat6-6.0.18.orig/java/org/apache/tomcat/util/net/AprEndpoint.java	2009-02-16 16:05:35.000000000 +0000
++++ tomcat6-6.0.18/java/org/apache/tomcat/util/net/AprEndpoint.java	2009-02-16 16:06:38.000000000 +0000
+@@ -599,8 +599,8 @@
+         long inetAddress = Address.info(addressStr, family,
+                 port, 0, rootPool);
+         // Create the APR server socket
+-        serverSock = Socket.create(family, Socket.SOCK_STREAM,
+-                Socket.APR_PROTO_TCP, rootPool);
++        serverSock = Socket.create(Address.getInfo(inetAddress).family,
++                Socket.SOCK_STREAM, Socket.APR_PROTO_TCP, rootPool);
+         if (OS.IS_UNIX) {
+             Socket.optSet(serverSock, Socket.APR_SO_REUSEADDR, 1);
+         }

Reply via email to