2

What is the solution to this?

New install of elasticsearch 5.4.1 on Centos 6.8

[2017-06-15T13:54:19,140][WARN ][o.e.b.Natives            ] unable to load JNA n
ative support library, native methods will be disabled.
java.lang.UnsatisfiedLinkError: /tmp/jna--1985354563/jna5608110195315969032.tmp:
 /tmp/jna--1985354563/jna5608110195315969032.tmp: failed to map segment from sha
red object: Operation not permitted
        at java.lang.ClassLoader$NativeLibrary.load(Native Method) ~[?:1.8.0_131
]
        at java.lang.ClassLoader.loadLibrary0(Unknown Source) ~[?:1.8.0_131]
        at java.lang.ClassLoader.loadLibrary(Unknown Source) ~[?:1.8.0_131]
        at java.lang.Runtime.load0(Unknown Source) ~[?:1.8.0_131]
        at java.lang.System.load(Unknown Source) ~[?:1.8.0_131]
        at com.sun.jna.Native.loadNativeDispatchLibraryFromClasspath(Native.java
:947) ~[jna-4.4.0.jar:4.4.0 (b0)]
        at com.sun.jna.Native.loadNativeDispatchLibrary(Native.java:922) ~[jna-4
.4.0.jar:4.4.0 (b0)]
        at com.sun.jna.Native.<clinit>(Native.java:190) ~[jna-4.4.0.jar:4.4.0 (b
0)]
        at java.lang.Class.forName0(Native Method) ~[?:1.8.0_131]
        at java.lang.Class.forName(Unknown Source) ~[?:1.8.0_131]
        at org.elasticsearch.bootstrap.Natives.<clinit>(Natives.java:45) [elasti
csearch-5.4.1.jar:5.4.1]
        at org.elasticsearch.bootstrap.Bootstrap.initializeNatives(Bootstrap.jav
a:105) [elasticsearch-5.4.1.jar:5.4.1]
2
  • According to this github issue, create a homedir for the elastic search user github.com/elastic/elasticsearch/issues/18272 Jun 15, 2017 at 19:14
  • @GraysonKent Thank you! I have a /home/elasticsearch dir, owned by user elasticsearch, and the problem persists. The error does not refer to the home dir, so not sure that home dir is the direction of the issue? Jun 15, 2017 at 20:10

1 Answer 1

3

Solved this one.

/tmp was mounted noexec.

Updated /etc/fstab to mount /tmp w exec, and this issue is resolved.

Partly discussed here https://github.com/elastic/elasticsearch/issues/18406

6
  • can you please explain this to me ? i dont understand
    – gagantous
    Dec 15, 2017 at 3:36
  • i am nanoing /etc/fstab but i dont know what should i do
    – gagantous
    Dec 15, 2017 at 3:36
  • @gagantous This was two years ago, and I do not recall details. I have installed elastic many times since then, no problems. Dec 15, 2017 at 5:56
  • no more JNA library error ???
    – gagantous
    Dec 15, 2017 at 6:13
  • ever tried to install elastic in Debian ?
    – gagantous
    Dec 15, 2017 at 6:14

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.