Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

InvocationTargetException while starting hudson on centOS

I installed Hudson using instructions given at http://hudson-ci.org/redhat/. When I ran the following command I got InvocationTargetException.

root@host ~ # service hudson start

Caused by: java.lang.UnsatisfiedLinkError: /tmp/jna9143314259601764116.tmp: /tmp/jna9143314259601764116.tmp: failed to map segment from shared object: Operation not permitted

I am using Java's latest JDK... Any help?

like image 244
a_fan Avatar asked May 31 '26 12:05

a_fan


1 Answers

Realise this is an old question, but I stumbled across this looking for something else.

You cannot load a native library from inside a JAR file. Something is probably spitting out a bundled native library to /tmp/ before trying to load it from there. You have probably mounted /tmp/ with noexec, have a look in /etc/fstab:

tmpfs /tmp tmpfs defaults,noexec,nosuid 0 0

It isn't a great idea, but you could remove the noexec from the mount.

Another (slightly better) way to fix this, provided the software doesn't depend on /tmp/ specifically, is to change the Java tmp dir:

-Djava.io.tmpdir=/some/writable/directory
like image 131
gub Avatar answered Jun 04 '26 00:06

gub



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!