Issue
-
/tmp directory is mounted with noexec
... Caused by: java.lang.UnsatisfiedLinkError: /tmp/jna ... failed to map segment from shared object: Operation not permitted
Resolution
Any of the below solutions can be used.
-
Permanently Remove noexec from /tmp mount
# 1. Edit /etc/fstab # Remove noexec from line containing /tmp mount vi /etc/fstab # 2. Restart shutdown -r now # 3. Confirm /tmp now allows executing # /tmp should not include noexec mount -l # 4. Confirm Jenkins starts correctly service jenkins start
-
Change java.io.tmpdir
# 1. Edit Jenkins config file # Add -Djava.io.tmpdir=$JENKINS_HOME/tmp to JENKINS_JAVA_OPTIONS # Eg. JENKINS_JAVA_OPTIONS="-Djava.io.tmpdir=$JENKINS_HOME/tmp" vi /etc/sysconfig/jenkins # 2. Create tmp directory mkdir $JENKINS_HOME/tmp # 3. Make sure Jenkins is the owner chown MY_JENKINS_USER:MY_JENKINS_GROUP $JENKINS_HOME/tmp # 4. Restart Jenkins service jenkins restart
This article is part of our Knowledge Base and is provided for guidance-based purposes only. The solutions or workarounds described here are not officially supported by CloudBees and may not be applicable in all environments. Use at your own discretion, and test changes in a safe environment before applying them to production systems.