I believe I figured this out.

After experiencing this problem on a CentOS 6.5 VM, I decided to start the Jenkins server interactively (eg., java -jar jenkins.war ... )

I saw a very curious warning:

Nov 21, 2014 10:46:51 PM jenkins.diagnosis.HsErrPidList <init>
WARNING: Failed to list up hs_err_pid files
java.lang.UnsatisfiedLinkError: /tmp/jna/jna4408307760862063272.tmp: /tmp/jna/jna4408307760862063272.tmp: failed to map segment from shared object: Operation not permitted

This reminded me of a very similar problem on CentOS 6.5 with ruby-build that I documented @ https://github.com/sstephenson/ruby-build/issues/604#issuecomment-54310466

The cause seems to be when $TMPDIR is mounted as noexec. Just re-mount your temp dir and tmpfs as executable:

$ mount
/dev/mapper/vglocal20140828-root00 on / type ext4 (rw)
proc on /proc type proc (rw)
sysfs on /sys type sysfs (rw)
devpts on /dev/pts type devpts (rw,gid=5,mode=620)
tmpfs on /dev/shm type tmpfs (rw,noexec,nosuid,nodev)
/dev/sda1 on /boot type ext3 (rw)
/dev/mapper/vglocal20140828-tmp00 on /tmp type ext4 (rw,noexec,nosuid,nodev)
/dev/mapper/vglocal20140828-log00 on /var/log type ext4 (rw)
none on /proc/sys/fs/binfmt_misc type binfmt_misc (rw)

I was able to resolve by removing the noexec option from /tmp and tmpfs and re-mounting both:

$ cp /etc/fstab /tmp/~fstab
$ sudo vi /etc/fstab
$ diff /tmp/~fstab /etc/fstab
11c11
< /dev/mapper/vglocal20140828-tmp00 /tmp ext4 defaults,nosuid,nodev,noexec 1 2
---
> /dev/mapper/vglocal20140828-tmp00 /tmp ext4 defaults,nosuid,nodev 1 2
14c14
< tmpfs /dev/shm tmpfs defaults,nosuid,nodev,noexec 0 0
---
> tmpfs /dev/shm tmpfs defaults,nosuid,nodev 0 0
$ sudo mount -o remount /tmp
$ sudo  mount -o remount tmpfs
$ mount
/dev/mapper/vglocal20140828-root00 on / type ext4 (rw)
proc on /proc type proc (rw)
sysfs on /sys type sysfs (rw)
devpts on /dev/pts type devpts (rw,gid=5,mode=620)
tmpfs on /dev/shm type tmpfs (rw,nosuid,nodev)
/dev/sda1 on /boot type ext3 (rw)
/dev/mapper/vglocal20140828-tmp00 on /tmp type ext4 (rw,nosuid,nodev)
/dev/mapper/vglocal20140828-log00 on /var/log type ext4 (rw)
none on /proc/sys/fs/binfmt_misc type binfmt_misc (rw)
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators.
For more information on JIRA, see: http://www.atlassian.com/software/jira

--
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to