tomcat8: Errors thrown when connecting to default HTTP connector (localhost:8080)

Bug #1766882 reported by Alan Orth
28
This bug affects 6 people
Affects Status Importance Assigned to Milestone
tomcat8 (Debian)
New
Unknown
tomcat8 (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

Testing tomcat8 (8.5.30-1ubuntu1) with openjdk-8-jdk-headless on Ubuntu bionic I noticed the following error when connecting to Tomcat on the default HTTP connector:

25-Apr-2018 13:44:00.135 SEVERE [http-nio-127.0.0.1-8080-exec-1] org.apache.coyote.AbstractProtocol$ConnectionHandler.process Error reading request, ignored
 java.lang.NoSuchMethodError: java.nio.ByteBuffer.position(I)Ljava/nio/ByteBuffer;
        at org.apache.coyote.http11.Http11InputBuffer.init(Http11InputBuffer.java:688)
        at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:672)
        at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66)
        at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:790)
        at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1459)
        at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
        at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
        at java.lang.Thread.run(Thread.java:748)

This same configuration was working ~2 weeks ago in early 2018-04. Looking at the tomcat8 publishing history for Ubuntu bionic[0] I see the package was recently synced from Debian sid. There is currently an open bug for this in Debian[1], the resolution of which states that tomcat8 8.5.30-1 was compiled with OpenJDK 9 and therefore will not run with OpenJDK 8.

[0] https://launchpad.net/ubuntu/+source/tomcat8/+publishinghistory
[1] https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=895866

Changed in tomcat8 (Debian):
status: Unknown → New
Revision history for this message
Thomas (lostexception) wrote :

This seems to be related to my bug https://bugs.launchpad.net/ubuntu/+source/tomcat8/+bug/1766697 (sorry if this is the wrong way to link another bug). If the explanation is correct, dependencies and the init script in the tomcat8 package should be changed.

My workaround:

- Install openjdk-11-jre-headless

- Change init script /etc/init.d/tomcat8:
61c61
< for java_version in 9 8
---
> for java_version in 11 9

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in tomcat8 (Ubuntu):
status: New → Confirmed
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.