I am trying to setup cassandra in my RHEL 6.5 server. When i start cassandara, i get an ERROR related to JNA. The exception says class not found. However, I see in the logs
I went through the code in CLibrary.java and found following code where the exception is caught -
catch (UnsatisfiedLinkError e)
{
logger.warn("JNA link failure, one or more native method will be unavailable.");
logger.trace("JNA link failure details: {}", e.getMessage());
}
I restarted cassandra by changing the log-level in conf/logback.xml to TRACE, to print that extra detail -
<logger name="org.apache.cassandra" level="TRACE"/>
I could now see the real issue -
/tmp/jna-3506402/jna6068045839690239595.tmp: failed to map segment from shared object: Operation not permitted
This issue is caused due to noexec flag on the /tmp folder.
I then decided to change the tmp folder by changing tmpdir using option:
-Djava.io.tmpdir=/home/cassandra/tmp
That fixed the issue.
I added the options in cassandra-env.sh file. Added following statement -
JVM_OPTS="$JVM_OPTS -Djava.io.tmpdir=/home/cassandra/tmp"