1
[2020-11-05T02:04:56,175][WARN ][o.e.b.Natives            ] [1025377-Standby] unable to load JNA native support library, native methods will be disabled.
java.lang.UnsatisfiedLinkError: /tmp/elasticsearch-11205783174086777362/jna7181054455215506333.tmp: /tmp/elasticsearch-11205783174086777362/jna7181054455215506333.tmp: failed to map segment from shared object: Operation not permitted
    at java.lang.ClassLoader$NativeLibrary.load0(Native Method) ~[?:?]
    at java.lang.ClassLoader$NativeLibrary.load(ClassLoader.java:2452) ~[?:?]
    at java.lang.ClassLoader$NativeLibrary.loadLibrary(ClassLoader.java:2508) ~[?:?]
    at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:2704) ~[?:?]
    at java.lang.ClassLoader.loadLibrary(ClassLoader.java:2637) ~[?:?]
    at java.lang.Runtime.load0(Runtime.java:745) ~[?:?]
    at java.lang.System.load(System.java:1871) ~[?:?]
    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:340) ~[?:?]
    at org.elasticsearch.bootstrap.Natives.<clinit>(Natives.java:45) [elasticsearch-7.9.0.jar:7.9.0]
    at org.elasticsearch.bootstrap.Bootstrap.initializeNatives(Bootstrap.java:110) [elasticsearch-7.9.0.jar:7.9.0]
    at org.elasticsearch.bootstrap.Bootstrap.setup(Bootstrap.java:178) [elasticsearch-7.9.0.jar:7.9.0]
    at org.elasticsearch.bootstrap.Bootstrap.init(Bootstrap.java:393) [elasticsearch-7.9.0.jar:7.9.0]
    at org.elasticsearch.bootstrap.Elasticsearch.init(Elasticsearch.java:170) [elasticsearch-7.9.0.jar:7.9.0]
    at org.elasticsearch.bootstrap.Elasticsearch.execute(Elasticsearch.java:161) [elasticsearch-7.9.0.jar:7.9.0]
    at org.elasticsearch.cli.EnvironmentAwareCommand.execute(EnvironmentAwareCommand.java:86) [elasticsearch-7.9.0.jar:7.9.0]
    at org.elasticsearch.cli.Command.mainWithoutErrorHandling(Command.java:127) [elasticsearch-cli-7.9.0.jar:7.9.0]
    at org.elasticsearch.cli.Command.main(Command.java:90) [elasticsearch-cli-7.9.0.jar:7.9.0]
    at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:126) [elasticsearch-7.9.0.jar:7.9.0]
    at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:92) [elasticsearch-7.9.0.jar:7.9.0]
[2020-11-05T02:04:56,182][WARN ][o.e.b.Natives            ] [1025377-Standby] cannot check if running as root because JNA is not available
[2020-11-05T02:04:56,183][WARN ][o.e.b.Natives            ] [1025377-Standby] cannot install system call filter because JNA is not available
[2020-11-05T02:04:56,183][WARN ][o.e.b.Natives            ] [1025377-Standby] cannot register console handler because JNA is not available
[2020-11-05T02:04:56,184][WARN ][o.e.b.Natives            ] [1025377-Standby] cannot getrlimit RLIMIT_NPROC because JNA is not available
[2020-11-05T02:04:56,184][WARN ][o.e.b.Natives            ] [1025377-Standby] cannot getrlimit RLIMIT_AS because JNA is not available
[2020-11-05T02:04:56,184][WARN ][o.e.b.Natives            ] [1025377-Standby] cannot getrlimit RLIMIT_FSIZE because JNA is not available
[2020-11-05T02:04:56,292][INFO ][o.e.n.Node               ] [1025377-Standby] version[7.9.0], pid[84901], build[default/tar/a479a2a7fce0389512d6a9361301708b92dff667/2020-08-11T21:36:48.204330Z], OS[Linux/3.10.0-1062.4.3.el7.x86_64/amd64], JVM[AdoptOpenJDK/OpenJDK 64-Bit Server VM/14.0.1/14.0.1+7]
[2020-11-05T02:04:56,294][INFO ][o.e.n.Node               ] [1025377-test] JVM home [/data04/elasticsearch-7.9.0/jdk]

I am getting this error when I start as elasticsearch user. Also noticed that this user not finds already installed Java 8 and so used bundled jdk which is higher version.

When I run as my login user & by giving permission on extracted elasticsearch-7.9.0.tar.gz, none of these issues comes.

Any thoughts?

When I try with rpm, this error comes: Issue with elasticsearch rpm install on CentOS 7

Valsaraj Viswanathan
  • 1,473
  • 5
  • 28
  • 51
  • 1
    Does this answer your question? [Unable to load JNA native support library Elasticsearch 6.x](https://stackoverflow.com/questions/47824643/unable-to-load-jna-native-support-library-elasticsearch-6-x) – Kovalan R Nov 05 '20 at 07:35
  • When I apply this, error chnages but elasticsearch crashes. Somehow elasticsearch user unable to fine JAVA_HOME that already set which is Java 8 and it takes Java 14 as shown in the error in description. [1025377-test] JVM home [/data04/elasticsearch-7.9.0/jdk] - this is wrong one, we set already installed JAVA_HOME but this user unable to get that. – Valsaraj Viswanathan Nov 05 '20 at 07:54

0 Answers0