fix(docker): add jdk.net module to the jlink runtime - #499
Merged
Merged
Conversation
httpclient5 5.6 loads jdk.net.Sockets while initializing DefaultHttpClientConnectionOperator, so the trimmed runtime JDK made every crawl fail on its first request with NoClassDefFoundError: jdk/net/Sockets. Also crawl a page as part of the Wolfi image test, so runtime gaps like this one fail CI instead of a published image.
artem-shelkovnikov
approved these changes
Sep 18, 2026
Jan-Kazlouski-elastic
added a commit
that referenced
this pull request
Sep 18, 2026
12 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 #498
Every crawl in the published images failed on its first HTTP request with
NoClassDefFoundError: jdk/net/Sockets, so nothing was indexed.Dockerfile.wolfibuilds the runtime JDK withjlinkand omitted thejdk.netmodule.httpclient55.6 loadsjdk.net.Socketswhile initializingDefaultHttpClientConnectionOperator, so the class was missing at runtime.1.0.0still shippedhttpclient55.1, which does not touch that class, so only builds after the 5.6 bump (#485) are affected. Reverting the bump is not an option because it would reopen CVE-2026-64607 and the pinnedhttpcore5CVEs.Changes
jdk.netto thejlink --add-moduleslist inDockerfile.wolfi.buildkite/scripts/test-wolfi-image.sh, so runtime gaps in the trimmed JDK fail CI instead of a published imageVerification
The Wolfi base images require registry auth, so the real image could not be built locally. Instead this was A/B tested on the published
1.0.1-SNAPSHOTimage with the application andhttpclient55.6.3 held constant and only thejlinkmodule set swapped:jdk.net(currentmain)NoClassDefFoundError: jdk/net/Sockets, 0 pages visitedjdk.net(this PR)Finished a crawl. Result: success, 2 pages visitedjava --describe-module jdk.netconfirms that module exports thejdk.netpackage containingSockets.The updated Wolfi test script was run against both images: it passes on the fixed one and exits non-zero on the broken one, so it does guard this regression. The Wolfi image build itself is still only exercised in CI.
Checklists
Pre-Review Checklist
crawler.yml.exampleandelasticsearch.yml.example)v0.1.0)make noticeif any dependencies have been addedChanges Requiring Extra Attention
Adds one JDK module to the runtime image, which slightly increases image size. It keeps
httpclient55.6.3 and its CVE fixes in place.Related Pull Requests
Release Note
Fixed crawls failing immediately with
NoClassDefFoundError: jdk/net/Socketsin the Docker images.