fix(docker): replace outdated tcnative 1.2.35 with Apache tcnative 1.3.8 - #37399
fix(docker): replace outdated tcnative 1.2.35 with Apache tcnative 1.3.8#37399wezell wants to merge 1 commit into
Conversation
|
Claude finished @wezell's task in 2m 11s —— View job Code ReviewI reviewed the diff against
I traced the tag flow: Existing
Resolved
Nothing blocking in the docker/CI changes — the tag sanitization, tcnative build placement, dependency purges ( · |
dotCMS-Machine-User
left a comment
There was a problem hiding this comment.
✅ dotbot review: all reviewer models (meta/muse-spark-1.3, ~z-ai/glm-latest) agree — patch is correct.
approved automatically by dotbot
🐳 PR Docker test imageLatest build for commit docker pull dotcms/dotcms-test:pr-37399-issue-34067-fix-tcnative-apr-openssl3
docker pull dotcms/dotcms-test:pr-37399-issue-34067-fix-tcnative-apr-openssl3_b3219fa |
dotCMS-Machine-User
left a comment
There was a problem hiding this comment.
✅ dotbot review: all reviewer models (meta/muse-spark-1.3, ~z-ai/glm-latest) agree — patch is correct.
approved automatically by dotbot
dotCMS-Machine-User
left a comment
There was a problem hiding this comment.
✅ dotbot review: all reviewer models (meta/muse-spark-1.3, ~z-ai/glm-latest) agree — patch is correct.
approved automatically by dotbot
The Ubuntu 24.04 libtcnative-1 package (1.2.35) segfaults with OpenSSL 3.x during AprLifecycleListener SSL initialization (SIGSEGV in libcrypto.so.3). Tomcat 9 requires the tcnative 1.x line; build the current Apache release (1.3.8, SHA-512 pinned) from source in the java-base image and reuse it in the runtime and dev-env images instead of the distro package. Also handles SDKMAN ids containing '+' (e.g. 25.0.4+1-ms), which are not valid docker tags: the canonical id stays in .sdkmanrc and '+' is converted to '-' wherever the value becomes a docker tag. Fixes #34067
9b7d616 to
b3219fa
Compare
|
dotbot code review:
Replaces distro libtcnative-1 1.2.35 with source-built Apache tcnative 1.3.8 and propagates library path consistently across images; tag sanitization and TLS default are intentional and documented with no blocking defect found. Tip: comment with "/dotbot address comments" to attempt automated fixes for unresolved review threads. reviewed by dotbot · meta/muse-spark-1.3 · medium |
|
dotbot code review:
The tcnative 1.3.8 source build is SHA-512 pinned with an archive.apache.org fallback, and the library is propagated consistently (COPY + LD_LIBRARY_PATH + java.library.path) across the java-base, dotcms runtime, and dev-env images. The '+'→'-' docker-tag sanitization is applied consistently in all four CI paths and matches the parent/pom.xml default. Prior findings about the tarball URL, the pom literal, the TLS default, and the datasource strategy precedence were either fixed or explicitly confirmed intentional by the author, so no qualifying new findings remain. Tip: comment with "/dotbot address comments" to attempt automated fixes for unresolved review threads. reviewed by dotbot · ~z-ai/glm-latest · medium |
dotCMS-Machine-User
left a comment
There was a problem hiding this comment.
✅ dotbot review: all reviewer models (meta/muse-spark-1.3, ~z-ai/glm-latest) agree — patch is correct.
approved automatically by dotbot
Summary
dotCMS's SSL offloading to openssl has been broken since we moved to Ubuntu 24.04. We haven't noticed because it would fall back to using java's SSL but this has performance implications and it is better to offload it.
Fixes #34067
dotCMS crashed on startup with a JVM SIGSEGV inside
libcrypto.so.3when the Tomcat Native APR library initialized OpenSSL 3.x. Root cause: the Ubuntu 24.04libtcnative-1package (1.2.35, Jan 2023) is incompatible with OpenSSL 3.x — the very library version all our images install to offload Tomcat 9's SSL.Tomcat 9 requires the tcnative 1.x line (2.x is Tomcat 10.1+ only). This PR builds the current Apache release, tcnative 1.3.8, from source (SHA-512 pinned) against the image's own APR 1.7 / OpenSSL 3, and stops installing the distro package.
Changes
docker/java-base/Dockerfile/usr/local/tomcat-native(built once per java-base release, reused downstream); build deps purged; JDK default25.0.4+1-msdotCMS/src/main/docker/original/Dockerfilelibtcnative-1; copies tcnative from java-base; setsLD_LIBRARY_PATHdocker/dev-env/Dockerfile15-detect-fips-and-set-ssl-engine.sh.sdkmanrc25.0.4+1-msmaven-jobaction,deployment-phase,legacy-release,java-baseworkflows+→-where the SDKMAN id becomes a docker tag (docker tags cannot contain+)parent/pom.xmlruntime.docker.sdkman.java.versiondefaults to docker-tag-safe25.0.4-1-ms(maven cannot transform the.sdkmanrc-loaded property)Deployment note
The java-base image with tcnative is already pushed as
dotcms/java-base:25.0.4-1-ms(built viacicd_manual_build-java-base.yml), so downstream builds resolve immediately.Validation
just build(./mvnw -DskipTests clean install): BUILD SUCCESS, including the maven-driven docker image builddotcms/dotcms-test:1.0.0-SNAPSHOT): tcnative 1.3.8 present from java-base, no distrolibtcnative-1,LD_LIBRARY_PATHset, Java 25.0.4.1tomcat-jni.jar(whatAprLifecycleListenerdoes at startup):LD_LIBRARY_PATH+→-substitution verified for both+-containing and plain versions