iodigital-com / homebrew-opensearch-maintenance

OpenSearch Maintenance Homebrew Tap
MIT License
2 stars 0 forks source link

unable to load JNA native support library, native methods will be disabled. #5

Open nntoan opened 7 months ago

nntoan commented 7 months ago

I'm receiving this on any instance of opensearch@1, any idea how to resolve it?

[2024-04-26T14:30:23,414][WARN ][o.o.b.Natives            ] [WKMZT6B63BF1.global.publicisgroupe.net] unable to load JNA native support library, native methods will be disabled.
java.lang.UnsatisfiedLinkError: /Users/nntoan/Library/Caches/JNA/temp/jna11121677480485342421.tmp: dlopen(/Users/nntoan/Library/Caches/JNA/temp/jna11121677480485342421.tmp, 0x0001): tried: '/Users/nntoan/Library/Caches/JNA/temp/jna11121677480485342421.tmp' (fat file, but missing compatible architecture (have (i386,x86_64), need (arm64e)))
    at jdk.internal.loader.NativeLibraries.load(Native Method) ~[?:?]
    at jdk.internal.loader.NativeLibraries$NativeLibraryImpl.open(NativeLibraries.java:331) ~[?:?]
    at jdk.internal.loader.NativeLibraries.loadLibrary(NativeLibraries.java:197) ~[?:?]
    at jdk.internal.loader.NativeLibraries.loadLibrary(NativeLibraries.java:139) ~[?:?]
    at java.lang.ClassLoader.loadLibrary(ClassLoader.java:2418) ~[?:?]
    at java.lang.Runtime.load0(Runtime.java:852) ~[?:?]
    at java.lang.System.load(System.java:2025) ~[?:?]
    at com.sun.jna.Native.loadNativeDispatchLibraryFromClasspath(Native.java:1018) ~[jna-5.5.0.jar:5.5.0 (b0)]
    at com.sun.jna.Native.loadNativeDispatchLibrary(Native.java:988) ~[jna-5.5.0.jar:5.5.0 (b0)]
    at com.sun.jna.Native.<clinit>(Native.java:195) ~[jna-5.5.0.jar:5.5.0 (b0)]
    at java.lang.Class.forName0(Native Method) ~[?:?]
    at java.lang.Class.forName(Class.java:421) ~[?:?]
    at java.lang.Class.forName(Class.java:412) ~[?:?]
    at org.opensearch.bootstrap.Natives.<clinit>(Natives.java:58) [opensearch-1.3.14.jar:1.3.14]
    at org.opensearch.bootstrap.Bootstrap.initializeNatives(Bootstrap.java:123) [opensearch-1.3.14.jar:1.3.14]
    at org.opensearch.bootstrap.Bootstrap.setup(Bootstrap.java:191) [opensearch-1.3.14.jar:1.3.14]
    at org.opensearch.bootstrap.Bootstrap.init(Bootstrap.java:412) [opensearch-1.3.14.jar:1.3.14]
    at org.opensearch.bootstrap.OpenSearch.init(OpenSearch.java:178) [opensearch-1.3.14.jar:1.3.14]
    at org.opensearch.bootstrap.OpenSearch.execute(OpenSearch.java:169) [opensearch-1.3.14.jar:1.3.14]
    at org.opensearch.cli.EnvironmentAwareCommand.execute(EnvironmentAwareCommand.java:100) [opensearch-1.3.14.jar:1.3.14]
    at org.opensearch.cli.Command.mainWithoutErrorHandling(Command.java:138) [opensearch-cli-1.3.14.jar:1.3.14]
    at org.opensearch.cli.Command.main(Command.java:101) [opensearch-cli-1.3.14.jar:1.3.14]
    at org.opensearch.bootstrap.OpenSearch.main(OpenSearch.java:135) [opensearch-1.3.14.jar:1.3.14]
    at org.opensearch.bootstrap.OpenSearch.main(OpenSearch.java:101) [opensearch-1.3.14.jar:1.3.14]
aadmathijssen commented 4 months ago

I haven't encountered this issue myself.

I did find a post on the OpenSearch forum, where this issue was caused by permission issues:

https://forum.opensearch.org/t/opensearch-process-failed-to-start-due-to-java-lang-unsatisfiedlinkerror-tmp-opensearch-failed-to-map-segment-from-shared-object-error/9105/1