fix: Remove Tomcat Native APR library to resolve OpenSSL 3.x crash #34068
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
Removes the Tomcat Native APR library (libtcnative-1) from all Docker container builds and disables APR SSL Engine by default to prevent JVM segmentation faults when running on systems with OpenSSL 3.x.
Changes Made
Removed native library packages from all Dockerfiles:
docker/java-base/Dockerfile: Removedlibtcnative-1andlibapr1dotCMS/src/main/docker/original/Dockerfile: Removedlibtcnative-1andlibapr1docker/dev-env/Dockerfile: Removedlibtcnative-1andlibapr1Disabled APR SSL Engine by default:
dotCMS/src/main/resources/container/tomcat9/conf/server.xml: ChangedSSLEnginedefault fromontooffdotcms-integration/src/test/resources/server.xml: ChangedSSLEnginefromontooffTechnical Details
The Tomcat Native APR library version 1.2.35 (included with Tomcat 9.0.108) is incompatible with OpenSSL 3.x, causing JVM crashes during startup on modern systems like Ubuntu 24.04+, RHEL 9+, and other distributions that ship with OpenSSL 3.x.
Before this change:
SIGSEGV (0xb)inlibcrypto.so.3during APR SSL initializationorg.apache.tomcat.jni.SSL.fipsModeGet()methodAfter this change:
Testing
Impact
Environment Variable Override
The APR SSL Engine can still be enabled via environment variable if needed:
However, this will require the native library to be manually installed and may cause crashes on systems with OpenSSL 3.x.
Fixes #34067
🤖 Generated with Claude Code