Problbem with ES starting on hardened RHEL 7

I am just installing Sonarqube 7.6 on RHEL 7.6. I am getting the following message in the es.log on startup:

2019.02.27 09:58:03 WARN es[o.e.b.Natives] unable to load JNA native support library, native methods will be disabled.
java.lang.UnsatisfiedLinkError: /tmp/jna-1796922328/jna662323232322910.tmp: /tmp/jna-179693232328/jna6693223257910.tmp: failed to map segment from shared object: Operation not permitted

I have googled this and it seems because the server is hardened, the tmp folder is mounted with noexec. I have seen some people have added -Djna.tmpdir argument to the wrapper.conf, but I see there is “don’t edit this section” in sonarqube.

Has anyone seen this issue before and has a fix for it?


I found a fix for this…just add the following to the sonarqube-7.6/elasticsearch/config/jvm.options file:

JNA native tmp folder