Protocol handler initialization failed: java.lang.Exception: Socket bind failed: [22] Invalid argument

Bug #287645 reported by Craig
26
This bug affects 4 people
Affects Status Importance Assigned to Milestone
Apache Tomcat6 Package for Ubuntu
Fix Released
Medium
tomcat-native (Ubuntu)
Fix Released
High
Thierry Carrez
tomcat6 (Ubuntu)
Fix Released
Medium
Unassigned

Bug Description

Install Tomcat6, then start it. Works fine.

Install libtcnative-1, then start Tomcat. In the catalina log, you'll see:
Oct 22, 2008 12:35:17 PM org.apache.catalina.core.AprLifecycleListener init
INFO: APR capabilities: IPv6 [true], sendfile [true], accept filters [false], random [true].
Oct 22, 2008 12:35:17 PM org.apache.coyote.http11.Http11AprProtocol init
SEVERE: Error initializing endpoint
java.lang.Exception: Socket bind failed: [22] Invalid argument
        at org.apache.tomcat.util.net.AprEndpoint.init(AprEndpoint.java:612)
        at org.apache.coyote.http11.Http11AprProtocol.init(Http11AprProtocol.java:107)
        at org.apache.catalina.connector.Connector.initialize(Connector.java:1058)
        at org.apache.catalina.core.StandardService.initialize(StandardService.java:677)
        at org.apache.catalina.core.StandardServer.initialize(StandardServer.java:795)
        at org.apache.catalina.startup.Catalina.load(Catalina.java:530)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:616)
        at org.apache.catalina.startup.Bootstrap.load(Bootstrap.java:260)
        at org.apache.catalina.startup.Bootstrap.init(Bootstrap.java:275)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:616)
        at org.apache.commons.daemon.support.DaemonLoader.load(DaemonLoader.java:160)

And that's it. Tomcat isn't listening on any ports, and startup does not continue.

Disabling ipv6 seems to work around this, as described in http://ubuntuforums.org/showpost.php?p=2629769&postcount=3

However, I want to use ipv6... and it's enabled by default.

Revision history for this message
Craig (candrews-integralblue) wrote :

https://issues.apache.org/bugzilla/show_bug.cgi?id=43327 seems to be this same issue.

The fix is in 1.1.15 according to http://tomcat.apache.org/native-doc/miscellaneous/changelog.html.

I'm going to file a bump request.

Changed in tomcat6:
status: Unknown → Fix Released
Revision history for this message
Craig (candrews-integralblue) wrote :
Revision history for this message
JeppeM (jeppe-mariager) wrote :

I can confirm this issue with own installation of 5.5.27 (downloaded from apache site and installed, not via. the repository)

Thierry Carrez (ttx)
Changed in tomcat-native:
assignee: nobody → tcarrez
importance: Undecided → High
status: New → In Progress
Revision history for this message
Thierry Carrez (ttx) wrote :

From https://issues.apache.org/bugzilla/show_bug.cgi?id=43327
The fix in tomcat-native 1.1.15 also requires a patch in tomcat6 own code, which is in the trunk but not in 6.0.18.

Changed in tomcat6:
assignee: nobody → tcarrez
importance: Undecided → Medium
status: New → Triaged
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package tomcat-native - 1.1.16-0ubuntu1

---------------
tomcat-native (1.1.16-0ubuntu1) jaunty; urgency=low

  * New upstream release (LP: #290078, #287645)
  * debian/control, debian/rules: Builds with default-jdk

 -- Thierry Carrez <email address hidden> Mon, 16 Feb 2009 15:41:34 +0000

Changed in tomcat-native:
status: In Progress → Fix Released
Thierry Carrez (ttx)
Changed in tomcat6:
status: Triaged → In Progress
Revision history for this message
Thierry Carrez (ttx) wrote :

Debdiff for common update with bug 324212

tomcat6 (6.0.18-0ubuntu6) jaunty; urgency=low

  * Added debian/patches/tcnative-ipv6-fix-43327.patch to fix incompatibility
    between libtcnative-1 and ipv6 (fixes LP: #287645)
  * No longer create confusing /var/lib/tomcat6/lib or lib subdirectory in
    private instances, since they are ignored (LP: #324212)

 -- Thierry Carrez <email address hidden> Mon, 23 Feb 2009 10:16:37 +0000

The tcnative-ipv6-fix-43327.patch is from tomcat6 SVN trunk, should be in 6.0.19 (whenever it gets released).

Changed in tomcat6:
assignee: tcarrez → nobody
status: In Progress → Confirmed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package tomcat6 - 6.0.18-0ubuntu6

---------------
tomcat6 (6.0.18-0ubuntu6) jaunty; urgency=low

  * Added debian/patches/tcnative-ipv6-fix-43327.patch to fix incompatibility
    between libtcnative-1 and ipv6 (fixes LP: #287645)
  * No longer create confusing /var/lib/tomcat6/lib or lib subdirectory in
    private instances, since they are ignored (LP: #324212)

 -- Thierry Carrez <email address hidden> Mon, 23 Feb 2009 10:16:37 +0000

Changed in tomcat6:
status: Confirmed → Fix Released
Revision history for this message
Jochen Schneider (panama-joe) wrote :

Where can I find these latest packages? (tomcat6 - 6.0.18-0ubuntu, tomcat-native - 1.1.16-0ubuntu1)

Revision history for this message
Thierry Carrez (ttx) wrote :

This was fixed in the development release, Jaunty Jackalope, which will in time become Ubuntu 9.04. Running tomcat6 with tc-native is not really supported in 8.10.

Changed in tomcat6:
importance: Unknown → Medium
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.