Jenkins fails to start with JNA error


Attempting to start CloudBees Jenkins Enterprise or CloudBees Jenkins Operations Center results in a stacktrace similar to the one below:

Starting CloudBees Jenkins Enterprise Exception in thread "main" java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(
at sun.reflect.DelegatingMethodAccessorImpl.invoke(
at java.lang.reflect.Method.invoke(
at Main._main(
at Main.main(
Caused by: java.lang.UnsatisfiedLinkError: /tmp/jna--1712433994/jna7387046629130767794.tmp: /tmp/jna--1712433994/jna7387046629130767794.tmp: failed to map segment from shared object: Operation not permitted
at java.lang.ClassLoader$NativeLibrary.load(Native Method)
at java.lang.ClassLoader.loadLibrary0(
at java.lang.ClassLoader.loadLibrary(
at java.lang.Runtime.load0(
at java.lang.System.load(
at com.sun.jna.Native.loadNativeDispatchLibraryFromClasspath(
at com.sun.jna.Native.loadNativeDispatchLibrary(
at com.sun.jna.Native.<clinit>(
at com.sun.akuma.CLibrary.<clinit>(
at com.sun.akuma.JavaVMArguments.resolvePID(
at com.sun.akuma.JavaVMArguments.ofLinux(
at com.sun.akuma.JavaVMArguments.of(
at com.sun.akuma.JavaVMArguments.current(
at com.sun.akuma.Daemon.daemonize(
at com.sun.akuma.Daemon.all(
... 6 more



The issue is being caused by the noexec settings for the /tmp directory. These settings are preventing the Jenkins process to launch the JNA library from the /tmp directory.

To resolve the issue, please do either of the following.

Option 1: Change the temporary directory of Jenkins

To change the temporary directory that Jenkins uses, you need to:

  1. Create $JENKINS_HOME/tmp folder (e.g. /var/lib/jenkins/tmp for Jenkins LTS Red Hat distributions) using the Unix user that runs the Jenkins process (e.g. same $JENKINS_USER under /etc/sysconfig/jenkins for Jenkins LTS Red Hat distributions)
  2. Append$JENKINS_HOME/tmp into JENKINS_JAVA_OPTIONS variable (e.g. in the /etc/sysconfig/jenkins file for for Jenkins LTS Red Hat distributions

Option 2: Fix the mount option of /tmp

As root, edit /etc/fstab configuration file and remove noexec from the mount option of /tmp directory. Then run:

mount -o remount /tmp

to apply the modification.

Have more questions?


  • 0
    Rodion Baronov

    Omg thank you a lot whoever you are. I'm having a sleepless night fighting with Jenkins on CentOS and this tutorial finally solved an issue. God bless you and I wish you go to heaven :)

  • 0
    Benjamin Paz

    The jenkins user failed as above but 'noexec' was not used for the mounting of the 'tmp' folder but appears to the binding of 'tmp' to a folder w/o write permission.

    I used option 1 above to create a tmp folder belonging to the jenkins user. The jenkins service started as expected. 


  • 0
    Martin Etcheverri

    thank you , the option 1 work flawlessly! Good Karma for you! +1

  • 0
    Mecc Dispatch5

    Yes - may God bless you!  These instructions are amazing!  Thank You, Thank You.

Please sign in to leave a comment.