Repository navigation
fix(docker): add jdk.net to the java-base runtime so the OpenSearch client can connect (#37722) - #37723
Merged
Conversation
…lient can connect (#37722) httpcore5 5.4.3 (from #37626) uses jdk.net.Sockets on every new connection, and the jlinked runtime in dotcms/java-base did not include jdk.net. The OpenSearch client's I/O thread died with NoClassDefFoundError and every request hung (or failed with a 500 when TLS was off). Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
3 tasks
Contributor
|
Claude finished @fabrizzio-dotCMS's task in 34s —— View job Code ReviewTask list
The change adds
New IssuesNo issues found. Two non-blocking observations (not defects in the diff):
The fix is correct and minimal. · |
5 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Closes #37722. cc @wezell
httpcore55.4.3, from #37626, usesjdk.net.Socketson every new connection. The jlinked runtime indotcms/java-basedid not includejdk.net, so in the Docker image the OpenSearch client's I/O thread dies withNoClassDefFoundError: jdk/net/Socketsand every OpenSearch request hangs, or fails with a 500 when TLS is off. Builds, unit tests and IntelliJ run on a full JDK, which is why nothing else caught it.This adds
jdk.netto thejlink --add-moduleslist. The module only makes the extended socket option classes available; dotCMS sets none of those options, so nothing changes beyond the client no longer crashing.After merge,
dotcms/java-basehas to be republished (cicd_manual_build-java-base.yml) for product images to pick this up.Verified locally (arm64)
Base rebuilt from this Dockerfile (35 modules, Java 25.0.4.1), product image built on it with
httpcore5-5.4.3, against Elasticsearch 7.10.2 + OpenSearch 3.4.0:jdk/net/Sockets/ReflectionUtilserror in the logNot verified: the CI publish of the base image, or amd64. One local product build failed once on
verify-libvips.shand passed all 59 checks on the retry; the failing run was quiet, so the cause is unknown.🤖 Generated with Claude Code