New Install: unable to load JNA native support library

CentOS Linux release 7.4.1708 (Core)
java version "1.8.0_152"
elasticsearch-5.6.3

I am brand new to elasticsearch and hence, this is a brand new install.

I installed elasticsearch using the rpm. After installation, I attempted to start elasticsearch using systemctl and I get the following in the logs:

[2017-11-07T11:13:34,156][WARN ][o.e.b.Natives ] unable to load JNA native support library, native methods will be disabled.
java.lang.UnsatisfiedLinkError: Native library (com/sun/jna/linux-x86/libjnidispatch.so) not found in resource path ([file:/usr/share/elasticsearch/lib/HdrHistogram-2.1.9.jar, file:/usr/share/elasticsearch/lib/elasticsearch-5.6.3.jar, file:/usr/share/elasticsearch/lib/hppc-0.7.1.jar, file:/usr/share/elasticsearch/lib/jackson-core-2.8.6.jar, file:/usr/share/elasticsearch/lib/jackson-dataformat-cbor-2.8.6.jar, file:/usr/share/elasticsearch/lib/jackson-dataformat-smile-2.8.6.jar, file:/usr/share/elasticsearch/lib/jackson-dataformat-yaml-2.8.6.jar, file:/usr/share/elasticsearch/lib/java-version-checker-5.6.3.jar, file:/usr/share/elasticsearch/lib/jna-4.4.0-1.jar, file:/usr/share/elasticsearch/lib/joda-time-2.9.5.jar, file:/usr/share/elasticsearch/lib/jopt-simple-5.0.2.jar, file:/usr/share/elasticsearch/lib/jts-1.13.jar, file:/usr/share/elasticsearch/lib/log4j-1.2-api-2.9.1.jar, file:/usr/share/elasticsearch/lib/log4j-api-2.9.1.jar, file:/usr/share/elasticsearch/lib/log4j-core-2.9.1.jar, file:/usr/share/elasticsearch/lib/lucene-analyzers-common-6.6.1.jar, file:/usr/share/elasticsearch/lib/lucene-backward-codecs-6.6.1.jar, file:/usr/share/elasticsearch/lib/lucene-core-6.6.1.jar, file:/usr/share/elasticsearch/lib/lucene-grouping-6.6.1.jar, file:/usr/share/elasticsearch/lib/lucene-highlighter-6.6.1.jar, file:/usr/share/elasticsearch/lib/lucene-join-6.6.1.jar, file:/usr/share/elasticsearch/lib/lucene-memory-6.6.1.jar, file:/usr/share/elasticsearch/lib/lucene-misc-6.6.1.jar, file:/usr/share/elasticsearch/lib/lucene-queries-6.6.1.jar, file:/usr/share/elasticsearch/lib/lucene-queryparser-6.6.1.jar, file:/usr/share/elasticsearch/lib/lucene-sandbox-6.6.1.jar, file:/usr/share/elasticsearch/lib/lucene-spatial-6.6.1.jar, file:/usr/share/elasticsearch/lib/lucene-spatial-extras-6.6.1.jar, file:/usr/share/elasticsearch/lib/lucene-spatial3d-6.6.1.jar, file:/usr/share/elasticsearch/lib/lucene-suggest-6.6.1.jar, file:/usr/share/elasticsearch/lib/plugin-cli-5.6.3.jar, file:/usr/share/elasticsearch/lib/securesm-1.1.jar, file:/usr/share/elasticsearch/lib/snakeyaml-1.15.jar, file:/usr/share/elasticsearch/lib/spatial4j-0.6.jar, file:/usr/share/elasticsearch/lib/t-digest-3.0.jar])
at com.sun.jna.Native.loadNativeDispatchLibraryFromClasspath(Native.java:962) ~[jna-4.4.0-1.jar:4.4.0 (b0)]
at com.sun.jna.Native.loadNativeDispatchLibrary(Native.java:922) ~[jna-4.4.0-1.jar:4.4.0 (b0)]
at com.sun.jna.Native.(Native.java:190) ~[jna-4.4.0-1.jar:4.4.0 (b0)]
at java.lang.Class.forName0(Native Method) ~[?:1.8.0_152]
at java.lang.Class.forName(Class.java:264) ~[?:1.8.0_152]
at org.elasticsearch.bootstrap.Natives.(Natives.java:45) [elasticsearch-5.6.3.jar:5.6.3]
at org.elasticsearch.bootstrap.Bootstrap.initializeNatives(Bootstrap.java:105) [elasticsearch-5.6.3.jar:5.6.3]
at org.elasticsearch.bootstrap.Bootstrap.setup(Bootstrap.java:195) [elasticsearch-5.6.3.jar:5.6.3]
at org.elasticsearch.bootstrap.Bootstrap.init(Bootstrap.java:342) [elasticsearch-5.6.3.jar:5.6.3]
at org.elasticsearch.bootstrap.Elasticsearch.init(Elasticsearch.java:132) [elasticsearch-5.6.3.jar:5.6.3]
at org.elasticsearch.bootstrap.Elasticsearch.execute(Elasticsearch.java:123) [elasticsearch-5.6.3.jar:5.6.3]
at org.elasticsearch.cli.EnvironmentAwareCommand.execute(EnvironmentAwareCommand.java:70) [elasticsearch-5.6.3.jar:5.6.3]
at org.elasticsearch.cli.Command.mainWithoutErrorHandling(Command.java:134) [elasticsearch-5.6.3.jar:5.6.3]
at org.elasticsearch.cli.Command.main(Command.java:90) [elasticsearch-5.6.3.jar:5.6.3]
at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:91) [elasticsearch-5.6.3.jar:5.6.3]
at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:84) [elasticsearch-5.6.3.jar:5.6.3]

jna-4.4.0-1.jar is in /usr/share/elasticsearch/lib and libjnidispatch.so is in /usr/lib64/jna/libjnidispatch.so.

I imagine if I can get /usr/lib64/jna/libjnidispatch.so into the resource path, things should work but I am not sure how to do that.

Are you on a 32 bit system? We don't support 32 bit, and the lib it is searching for is 32 bit (com/sun/jna/linux-x86/libjnidispatch.so).

Also, the message is just a warning. The system can function without jna.

None of the dependencies installed is 32bit. The log is saying that elasticsearch is looking at that path not that I have 32bit java installed.

I'll have to look further down the logs to see why it won't start. I would still like to resolve this issue however.

If jna is looking for the 32bit lib, then it thinks the system is 32 bit.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.