# Not able to load JNA native support library

**URL:** <https://discuss.elastic.co/t/not-able-to-load-jna-native-support-library/191920>\
**Category:** Elasticsearch\
**Created:** [July 23, 2019, 9:28pm UTC](https://discuss.elastic.co/t/not-able-to-load-jna-native-support-library/191920 "2019-07-23T21:28:28Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![jason.kim](https://avatars.discourse-cdn.com/v4/letter/j/eada6e/32.png) [@jason.kim](https://discuss.elastic.co/u/jason.kim)\
**Post date:** [July 23, 2019, 9:28pm UTC](https://discuss.elastic.co/t/not-able-to-load-jna-native-support-library/191920/1 "2019-07-23T21:28:28Z")

</div>

I am installing ES on a hardened system and I am having issues with running my ES. When I try to run ES i get this error:

unable to load JNA native support library, native methods will be disabled.  
java.lang.UnsatisfiedLinkError: /tmp/jna--1985354563/jna2511322471324368372.tmp: /tmp/jna--1985354563/jna2511322471324368372.tmp: failed to map segment from shared object: Operation not permitted  
at java.lang.ClassLoader$NativeLibrary.load(Native Method) ~[?:1.8.0\_211]  
at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1941) ~[?:1.8.0\_211]  
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1824) ~[?:1.8.0\_211]  
at java.lang.Runtime.load0(Runtime.java:809) ~[?:1.8.0\_211]  
at java.lang.System.load(System.java:1086) ~[?:1.8.0\_211]  
at com.sun.jna.Native.loadNativeDispatchLibraryFromClasspath(Native.java:947) ~[jna-4.5.1.jar:4.5.1 (b0)]  
at com.sun.jna.Native.loadNativeDispatchLibrary(Native.java:922) ~[jna-4.5.1.jar:4.5.1 (b0)]  
at com.sun.jna.Native.(Native.java:190) ~[jna-4.5.1.jar:4.5.1 (b0)]  
at java.lang.Class.forName0(Native Method) ~[?:1.8.0\_211]  
at java.lang.Class.forName(Class.java:264) ~[?:1.8.0\_211]  
at org.elasticsearch.bootstrap.Natives.(Natives.java:45) [elasticsearch-6.4.3.jar:6.4.3]  
at org.elasticsearch.bootstrap.Bootstrap.initializeNatives(Bootstrap.java:103) [elasticsearch-6.4.3.jar:6.4.3]  
at org.elasticsearch.bootstrap.Bootstrap.setup(Bootstrap.java:171) [elasticsearch-6.4.3.jar:6.4.3]  
at org.elasticsearch.bootstrap.Bootstrap.init(Bootstrap.java:326) [elasticsearch-6.4.3.jar:6.4.3]  
at org.elasticsearch.bootstrap.Elasticsearch.init(Elasticsearch.java:136) [elasticsearch-6.4.3.jar:6.4.3]  
at org.elasticsearch.bootstrap.Elasticsearch.execute(Elasticsearch.java:127) [elasticsearch-6.4.3.jar:6.4.3]  
at org.elasticsearch.cli.EnvironmentAwareCommand.execute(EnvironmentAwareCommand.java:86) [elasticsearch-6.4.3.jar:6.4.3]  
at org.elasticsearch.cli.Command.mainWithoutErrorHandling(Command.java:124) [elasticsearch-cli-6.4.3.jar:6.4.3]  
at org.elasticsearch.cli.Command.main(Command.java:90) [elasticsearch-cli-6.4.3.jar:6.4.3]  
at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:93) [elasticsearch-6.4.3.jar:6.4.3]  
at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:86) [elasticsearch-6.4.3.jar:6.4.3]

I have created my environment variable: export ES\_JAVA\_OPTS=-Djna.tmpdir=/data/elasticsearch/tmp

I remounted my data directory to exec  
I am not allowed to remount my /tmp folder to exec (security reasons) as this does work for me..  
I've updated my /etc/sysconfig/elasticsearch and inputted ES\_JAVA\_OPTS=-Djna.tmpdir=/data/elasticsearch/tmp  
I have also updated my jvm.options and set -Djna.tmpdir=/data/elasticsearch/tmp

but it seems whenever i try to start elasticsearch it keeps on looking at the /tmp folder

any help would be great

---

<div class="post-metadata">

**Author:** ![jasontedor](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jasontedor/32/66992_2.png) [@jasontedor](https://discuss.elastic.co/u/jasontedor)\
**Post date:** [July 24, 2019, 3:55am UTC](https://discuss.elastic.co/t/not-able-to-load-jna-native-support-library/191920/2 "2019-07-24T03:55:15Z")

</div>

Can you share the log line that shows the JVM arguments at startup? It's one of the first log lines, but it would be after the exception message that you show.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [August 21, 2019, 3:55am UTC](https://discuss.elastic.co/t/not-able-to-load-jna-native-support-library/191920/3 "2019-08-21T03:55:16Z")

</div>

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