Tomcat AJP broken in combination with Apache 2.4
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
tomcat8 (Ubuntu) |
New
|
Undecided
|
Unassigned |
Bug Description
After upgrading Tomcat 8 to 8.5.30-1ubuntu1, the AJP connector in combination with Apache 2.4 (2.4.29-1ubuntu4) doesn't work any more on Bionic. I guess this is a quite common combination. Of course this could also be caused by Apache, but before the Tomcat upgrade (probably on 8.5.29-1) everything was fine.
My config on Apache side:
ProxyPass / ajp://localhost
ProxyPassRe
My config on Tomcat side (no other connectors active):
<Connector port="8009" protocol="AJP/1.3" redirectPort="8443" address="127.0.0.1" />
Symptoms:
- On first AJP connection, Tomcat goes to 100% CPU.
- The browser runs into timeout.
- If Tomcat access logging is enabled, localhost_
Of course I can give you more information if needed.
This seems to be related to https:/ /bugs.launchpad .net/ubuntu/ +source/ tomcat8/ +bug/1766882 (sorry if this is the wrong way to link another bug). My problem probably was that I was using OpenJDK 8. If the explanation is correct, dependencies and the init script in the tomcat8 package should be changed.
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