Issue 1:
Elasticsearch version: 2.3.2

JVM version: java version "1.8.0_45"

Java(TM) SE Runtime Environment (build 1.8.0_45-b14)

Java HotSpot(TM) 64-Bit Server VM (build 25.45-b02, mixed mode)

OS version: Centos 7 SELinux enabled

Description of the problem including expected versus actual behavior:

We have hardened Centos 7 where /tmp is not writeable

We have elasticsearch homedir in custom location and we link that custom location into /var/lib/elasticsearch.

We define tmp dir path in /etc/sysconfig/elasticserach as

Additional Java OPTS

ES_JAVA_OPTS="-Djna.tmpdir=/var/lib/elasticsearch/tmp" (we also tried without "" and with java.io.tmpdir=)

Steps to reproduce:

change tmpdir path in sysconfig

restart application

Provide logs (if relevant):

[2016-05-17 12:31:30,875][WARN ][bootstrap ] unable to load JNA native support library, native methods will be disabled. java.lang.UnsatisfiedLinkError: /tmp/jna--1985354563/jna306419785920339930.tmp: /tmp/jna--1985354563/jna306419785920339930.tmp: failed to map segment from shared object: Operation not permitted at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(Unknown Source) at java.lang.ClassLoader.loadLibrary(Unknown Source) at java.lang.Runtime.load0(Unknown Source) at java.lang.System.load(Unknown Source) at com.sun.jna.Native.loadNativeDispatchLibraryFromClasspath(Native.java:761) at com.sun.jna.Native.loadNativeDispatchLibrary(Native.java:736) at com.sun.jna.Native.<clinit>(Native.java:131) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Unknown Source) at org.elasticsearch.bootstrap.Natives.<clinit>(Natives.java:45) at org.elasticsearch.bootstrap.Bootstrap.initializeNatives(Bootstrap.java:89) at org.elasticsearch.bootstrap.Bootstrap.setup(Bootstrap.java:144) at org.elasticsearch.bootstrap.Bootstrap.init(Bootstrap.java:270) at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:35)

elasticsearch_dump.txt

Issue 2:
Elasticsearch version: 2.3.2

JVM version: java version "1.8.0_45"

Java(TM) SE Runtime Environment (build 1.8.0_45-b14)

Java HotSpot(TM) 64-Bit Server VM (build 25.45-b02, mixed mode)

OS version: Centos 7 SELinux enabled

Description of the problem including expected versus actual behavior:

We have hardened Centos 7 where /tmp is not writeable

We have elasticsearch homedir in custom location and we link that custom location into /var/lib/elasticsearch.

We define tmp dir path in /etc/sysconfig/elasticserach as

Additional Java OPTS

ES_JAVA_OPTS="-Djna.tmpdir=/var/lib/elasticsearch/tmp" (we also tried without "" and with java.io.tmpdir=)

Steps to reproduce:

change tmpdir path in sysconfig

restart application

Provide logs (if relevant):

[2016-05-17 12:31:30,875][WARN ][bootstrap ] unable to load JNA native support library, native methods will be disabled. java.lang.UnsatisfiedLinkError: /tmp/jna--1985354563/jna306419785920339930.tmp: /tmp/jna--1985354563/jna306419785920339930.tmp: failed to map segment from shared object: Operation not permitted at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(Unknown Source) at java.lang.ClassLoader.loadLibrary(Unknown Source) at java.lang.Runtime.load0(Unknown Source) at java.lang.System.load(Unknown Source) at com.sun.jna.Native.loadNativeDispatchLibraryFromClasspath(Native.java:761) at com.sun.jna.Native.loadNativeDispatchLibrary(Native.java:736) at com.sun.jna.Native.<clinit>(Native.java:131) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Unknown Source) at org.elasticsearch.bootstrap.Natives.<clinit>(Natives.java:45) at org.elasticsearch.bootstrap.Bootstrap.initializeNatives(Bootstrap.java:89) at org.elasticsearch.bootstrap.Bootstrap.setup(Bootstrap.java:144) at org.elasticsearch.bootstrap.Bootstrap.init(Bootstrap.java:270) at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:35)

elasticsearch_dump.txt