Maha
September 1, 2025, 5:47am
1
Versions (relevant - OpenSearch Plugin): 2.19.x
Describe the issue : opensearchknn_faiss_avx2.so is not delivered as part of 2.19.x series,
some environments expect .avx2 files instead of faiss.so files.
Hence, the basic deployement itself failing if KNN plugin is enabled during opensearch installation phase.
Could you please explain is there is any workaround for 2.19.x series to work for avx2 cpu machines.
Configuration : Opensearch KNN plugin enabled with 2.19.2
Relevant Logs or Screenshots :
{“message”:“java.lang.NoClassDefFoundError: Could not initialize class org.opensearch.knn.jni.FaissService”,“metadata”:\{“container_name”:“data”],{“message”:"\tat org.opensearch.knn}
pablo
September 18, 2025, 8:19am
2
@Maha , This issue has already been raised in the OpenSearch GitHub.
opened 10:28AM - 02 Apr 25 UTC
bug
### Describe the bug
The published zip (e.g. [for 2.19.1](https://repo1.maven.o… rg/maven2/org/opensearch/plugin/opensearch-knn/2.19.1.0/opensearch-knn-2.19.1.0.zip)) file on the maven repository for the opensearch-knn plugin is missing certain native library (`.so`) files that the plugin requires:
```
opensearch.daemon[26956]: java.lang.UnsatisfiedLinkError: no opensearchknn_faiss_avx2 in java.library.path: /usr/java/packages/lib:/usr/lib64:/lib64:/lib:/usr/lib
opensearch.daemon[26956]: at java.base/java.lang.ClassLoader.loadLibrary(ClassLoader.java:2434)
opensearch.daemon[26956]: at java.base/java.lang.Runtime.loadLibrary0(Runtime.java:818)
opensearch.daemon[26956]: at java.base/java.lang.System.loadLibrary(System.java:2006)
opensearch.daemon[26956]: at org.opensearch.knn.jni.FaissService.lambda$static$0(FaissService.java:52)
opensearch.daemon[26956]: at java.base/java.security.AccessController.doPrivileged(AccessController.java:318)
opensearch.daemon[26956]: at org.opensearch.knn.jni.FaissService.<clinit>(FaissService.java:42)
opensearch.daemon[26956]: at org.opensearch.knn.jni.JNIService.initIndex(JNIService.java:50)
```
These are the ZIP file contents:
```
M Mode Size Date&time Filename
- ---------- ------- -------------------- ----------------
-rw-r--r-- 1907 1-Feb-1980 00:00:00 plugin-descriptor.properties
-rw-r--r-- 700 1-Feb-1980 00:00:00 plugin-security.policy
-rw-r--r-- 868814 1-Feb-1980 00:00:00 opensearch-knn-2.19.1.0.jar
-rw-r--r-- 4617 1-Feb-1980 00:00:00 failureaccess-1.0.1.jar
-rw-r--r-- 3043932 1-Feb-1980 00:00:00 guava-32.1.3-jre.jar
-rw-r--r-- 284220 1-Feb-1980 00:00:00 commons-lang-2.6.jar
-rw-r--r-- 1363209 1-Feb-1980 00:00:00 jna-platform-5.13.0.jar
-rw-r--r-- 979563 1-Feb-1980 00:00:00 oshi-core-6.4.13.jar
-rw-r--r-- 41125 1-Feb-1980 00:00:00 slf4j-api-1.7.36.jar
-rw-r--r-- 51 1-Feb-1980 00:00:00 NOTICE.txt
-rw-r--r-- 20535 1-Feb-1980 00:00:00 LICENSE.txt
- ---------- ------- -------------------- ----------------
6608673 11 files
```
There are certain files that the plugin requires which _are_ present on the big [opensearch tar build](https://opensearch.org/downloads.html):
```
opensearch-2.19.1/plugins/opensearch-knn/lib/
opensearch-2.19.1/plugins/opensearch-knn/lib/libgomp.so
opensearch-2.19.1/plugins/opensearch-knn/lib/libgomp.so.1
opensearch-2.19.1/plugins/opensearch-knn/lib/libopensearchknn_common.so
opensearch-2.19.1/plugins/opensearch-knn/lib/libopensearchknn_faiss.so
opensearch-2.19.1/plugins/opensearch-knn/lib/libopensearchknn_faiss_avx2.so
opensearch-2.19.1/plugins/opensearch-knn/lib/libopensearchknn_faiss_avx512.so
opensearch-2.19.1/plugins/opensearch-knn/lib/libopensearchknn_faiss_avx512_spr.so
opensearch-2.19.1/plugins/opensearch-knn/lib/libopensearchknn_nmslib.so
opensearch-2.19.1/plugins/opensearch-knn/lib/libopensearchknn_util.so
opensearch-2.19.1/plugins/opensearch-knn/opensearch-knn-2.19.1.0.jar
```
Is that intentional? Can the `.so` files be published on maven too?
### Expected behavior
KNN plugin from maven can work.
1 Like
system
Closed
November 17, 2025, 8:19am
3
This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.