Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 950962 - app-misc/elasticsearch-8.17.3 fails to start: java.lang.module.FindException: Module jdk.attach not found, required by org.elasticsearch.entitlement
Summary: app-misc/elasticsearch-8.17.3 fails to start: java.lang.module.FindException:...
Status: UNCONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Matt Jolly
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-03-08 23:39 UTC by nebojsa
Modified: 2025-03-10 15:47 UTC (History)
4 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
Depend on jdk insted of on jre (elasticsearch.patch,389 bytes, patch)
2025-03-08 23:41 UTC, nebojsa
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description nebojsa 2025-03-08 23:39:17 UTC
elasticsearch-8.17 introduced dependency on jdk. Without a jdk installed, it fails to start complaining about jdk.attach module not found.
After installing virtual/jdk:17, it works without a problem

Reproducible: Always
Comment 1 nebojsa 2025-03-08 23:41:20 UTC
Created attachment 920379 [details, diff]
Depend on jdk insted of on jre
Comment 2 Volkmar W. Pogatzki 2025-03-09 07:06:56 UTC
(In reply to nebojsa from comment #0)
> elasticsearch-8.17 introduced dependency on jdk. Without a jdk installed, it
> fails to start complaining about jdk.attach module not found.
> After installing virtual/jdk:17, it works without a problem
> 
> Reproducible: Always

Usually if using virtual/jdk, it should go in DEPEND according to https://wiki.gentoo.org/wiki/Java_Developer_Guide#JDK.2FJRE.
In RDEPEND you put virtual/jre - and don't forget to inherit either of 
java-pkg-2.eclass of java-pkg-opt-2.eclass.
Comment 3 nebojsa 2025-03-10 14:23:37 UTC
(In reply to Volkmar W. Pogatzki from comment #2)
> (In reply to nebojsa from comment #0)
> > elasticsearch-8.17 introduced dependency on jdk. Without a jdk installed, it
> > fails to start complaining about jdk.attach module not found.
> > After installing virtual/jdk:17, it works without a problem
> > 
> > Reproducible: Always
> 
> Usually if using virtual/jdk, it should go in DEPEND according to
> https://wiki.gentoo.org/wiki/Java_Developer_Guide#JDK.2FJRE.
> In RDEPEND you put virtual/jre - and don't forget to inherit either of 
> java-pkg-2.eclass of java-pkg-opt-2.eclass.

This package is not compiled - it is a binary bundle, that's why it does not inherit java-pkg-*.eclass.
Further, it depends on jdk runtime, and not on jre runtime. Running it with jre runtime is what produces the error.
If anything, package name could be changed to better reflect its contents, to elasticsearch-bin, and a warning could be issued to the user about either setting up jdk as system-vm or setting ES_JAVA_HOME in /etc/conf.d/elasticsearch to point to one.
Comment 4 Volkmar W. Pogatzki 2025-03-10 15:14:34 UTC
afaik, binary blob should never depend on jdk. if it does, there's something wrong.