alexklibisz / elastiknn

Elasticsearch plugin for nearest neighbor search. Store vectors and run similarity search using exact and approximate algorithms.
https://alexklibisz.github.io/elastiknn
Apache License 2.0
362 stars 48 forks source link

Using bitnami/elasticsearch: 8.14.1 add elastiknn I start an error #696

Closed liuxin638507 closed 1 month ago

liuxin638507 commented 1 month ago

Support guidelines

Background

cat Dockerfile

FROM  bitnami/elasticsearch:8.14.1
COPY elastiknn-8.14.1.0.zip /opt/bitnami/elasticsearch/plugins/elastiknn
RUN cd /opt/bitnami/elasticsearch/plugins/elastiknn && unzip elastiknn-8.14.1.0.zip && rm elastiknn-8.14.1.0.zip

Bug

elasticsearch 16:09:52.64 INFO ==> elasticsearch 16:09:52.64 INFO ==> Welcome to the Bitnami elasticsearch container elasticsearch 16:09:52.65 INFO ==> Subscribe to project updates by watching https://github.com/bitnami/containers elasticsearch 16:09:52.65 INFO ==> Submit issues and feature requests at https://github.com/bitnami/containers/issues elasticsearch 16:09:52.65 INFO ==> Upgrade to Tanzu Application Catalog for production environments to access custom-configured and pre-packaged software components. Gain enhanced features, including Software Bill of Materials (SBOM), CVE scan result reports, and VEX documents. To learn more, visit https://bitnami.com/enterprise elasticsearch 16:09:52.66 INFO ==> elasticsearch 16:09:52.68 INFO ==> Starting Elasticsearch setup elasticsearch 16:09:52.74 WARN ==> Setting ELASTICSEARCH_IS_DEDICATED_NODE is disabled. elasticsearch 16:09:52.74 WARN ==> ELASTICSEARCH_NODE_ROLES will be ignored and Elasticsearch will asume all different roles. elasticsearch 16:09:52.75 INFO ==> Configuring/Initializing Elasticsearch... elasticsearch 16:09:52.82 INFO ==> Setting default configuration elasticsearch 16:09:52.89 INFO ==> Configuring Elasticsearch cluster settings... warning: ignoring JAVA_HOME=/opt/bitnami/java; using ES_JAVA_HOME elasticsearch 16:09:55.64 INFO ==> Elasticsearch setup finished!

elasticsearch 16:09:55.69 INFO ==> Starting Elasticsearch warning: ignoring JAVA_HOME=/opt/bitnami/java; using ES_JAVA_HOME [2024-06-27T08:10:01,992][INFO ][o.e.n.NativeAccess ] [023641cbff87] Using [jna] native provider and native methods for [Linux] [2024-06-27T08:10:03,225][INFO ][o.e.n.Node ] [023641cbff87] version[8.14.1], pid[306], build[tar/93a57a1a76f556d8aee6a90d1a95b06187501310/2024-06-10T23:35:17.114581191Z], OS[Linux/5.4.3-1.el7.elrepo.x86_64/amd64], JVM[BellSoft/OpenJDK 64-Bit Server VM/17.0.11/17.0.11+12-LTS] [2024-06-27T08:10:03,226][INFO ][o.e.n.Node ] [023641cbff87] JVM home [/opt/bitnami/java], using bundled JDK [false] [2024-06-27T08:10:03,226][INFO ][o.e.n.Node ] [023641cbff87] JVM arguments [-Des.networkaddress.cache.ttl=60, -Des.networkaddress.cache.negative.ttl=10, -Djava.security.manager=allow, -XX:+AlwaysPreTouch, -Xss1m, -Djava.awt.headless=true, -Dfile.encoding=UTF-8, -Djna.nosys=true, -XX:-OmitStackTraceInFastThrow, -Dio.netty.noUnsafe=true, -Dio.netty.noKeySetOptimization=true, -Dio.netty.recycler.maxCapacityPerThread=0, -Dlog4j.shutdownHookEnabled=false, -Dlog4j2.disable.jmx=true, -Dlog4j2.formatMsgNoLookups=true, -Djava.locale.providers=SPI,COMPAT, --add-opens=java.base/java.io=org.elasticsearch.preallocate, --add-opens=org.apache.lucene.core/org.apache.lucene.store=org.elasticsearch.vec, -XX:ReplayDataFile=logs/replay_pid%p.log, -Djava.library.path=/opt/bitnami/elasticsearch/lib/platform/linux-x64:/opt/bitnami/elasticsearch/jdk/lib:/opt/bitnami/elasticsearch/jdk/lib/server::/usr/java/packages/lib:/usr/lib64:/lib64:/lib:/usr/lib, -Djna.library.path=/opt/bitnami/elasticsearch/lib/platform/linux-x64:/opt/bitnami/elasticsearch/jdk/lib:/opt/bitnami/elasticsearch/jdk/lib/server::/usr/java/packages/lib:/usr/lib64:/lib64:/lib:/usr/lib, -Des.distribution.type=tar, -XX:+UseG1GC, -Djava.io.tmpdir=/tmp/elasticsearch-13737200800603789306, -XX:+HeapDumpOnOutOfMemoryError, -XX:+ExitOnOutOfMemoryError, -XX:HeapDumpPath=data, -XX:ErrorFile=logs/hs_err_pid%p.log, -Xlog:gc*,gc+age=trace,safepoint:file=logs/gc.log:utctime,level,pid,tags:filecount=32,filesize=64m, -Xms1024m, -Xmx1024m, -XX:MaxDirectMemorySize=536870912, -XX:G1HeapRegionSize=4m, -XX:InitiatingHeapOccupancyPercent=30, -XX:G1ReservePercent=15, --module-path=/opt/bitnami/elasticsearch/lib, --add-modules=jdk.net, --add-modules=ALL-MODULE-PATH, -Djdk.module.main=org.elasticsearch.server] [2024-06-27T08:10:03,227][INFO ][o.e.n.Node ] [023641cbff87] Default Locale [en_US] [2024-06-27T08:10:03,313][ERROR][o.e.b.Elasticsearch ] [023641cbff87] fatal exception while booting Elasticsearch java.lang.IllegalStateException: plugin elastiknn requires Java 21:, your system: 17.0.11+12-LTS at org.elasticsearch.base@8.14.1/org.elasticsearch.jdk.JarHell.checkJavaVersion(JarHell.java:280) at org.elasticsearch.server@8.14.1/org.elasticsearch.plugins.PluginDescriptor.readJavaVersion(PluginDescriptor.java:320) at org.elasticsearch.server@8.14.1/org.elasticsearch.plugins.PluginDescriptor.readerInternalDescriptor(PluginDescriptor.java:266) at org.elasticsearch.server@8.14.1/org.elasticsearch.plugins.PluginDescriptor.readFromProperties(PluginDescriptor.java:251) at org.elasticsearch.server@8.14.1/org.elasticsearch.plugins.PluginsUtils.readPluginBundle(PluginsUtils.java:255) at org.elasticsearch.server@8.14.1/org.elasticsearch.plugins.PluginsUtils.findBundles(PluginsUtils.java:236) at org.elasticsearch.server@8.14.1/org.elasticsearch.plugins.PluginsUtils.getPluginBundles(PluginsUtils.java:218) at org.elasticsearch.server@8.14.1/org.elasticsearch.plugins.PluginsService.(PluginsService.java:156) at org.elasticsearch.server@8.14.1/org.elasticsearch.node.NodeServiceProvider.newPluginService(NodeServiceProvider.java:54) at org.elasticsearch.server@8.14.1/org.elasticsearch.node.NodeConstruction.createEnvironment(NodeConstruction.java:451) at org.elasticsearch.server@8.14.1/org.elasticsearch.node.NodeConstruction.prepareConstruction(NodeConstruction.java:252) at org.elasticsearch.server@8.14.1/org.elasticsearch.node.Node.(Node.java:192) at org.elasticsearch.server@8.14.1/org.elasticsearch.bootstrap.Elasticsearch$2.(Elasticsearch.java:240) at org.elasticsearch.server@8.14.1/org.elasticsearch.bootstrap.Elasticsearch.initPhase3(Elasticsearch.java:240) at org.elasticsearch.server@8.14.1/org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:75)

ERROR: Elasticsearch did not exit normally - check the logs at /opt/bitnami/elasticsearch/logs/elasticsearch.log

ERROR: Elasticsearch died while starting up, with exit code 1

Elastiknn Version

8.14.1.0

Platform

docker 24.0.9

Steps to reproduce

No response

Additional info

No response

alexklibisz commented 1 month ago

fatal exception while booting Elasticsearch java.lang.IllegalStateException: plugin elastiknn requires Java 21:, your system: 17.0.11+12-LTS

From https://www.elastic.co/guide/en/elasticsearch/reference/current/release-notes-8.14.0.html#upgrade-8.14.0

Update bundled JDK to Java 22 (again) #108654

So it looks like 8.14.0 ships with Java 22.

So I guess the bitnami image is using Java 17, whereas elastiknn expects/requires at least Java 21. So you should figure out why the container is still on Java 17 and how to get it onto Java 21+