Jna Link Issue While Starting Cassandra Rhel 6.5

JNA link issue while starting cassandra RHEL 6.5

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"

Jna Linkage Error : How to solve this error while starting cassandra

As per JIRA, current latest cassandra 3.11 is still not fully supported for java 1.9. Hence, I would recommend you to try again with java 1.8.

JNA link failure Error on Cassandra Startup on OS X

JNA is used for optimizations such as disabling swapping and creating hardlinks during snapshots. It is recommended for production systems. Dev systems should also be fine without JNA support, so you can just ignore the warning.

Cassandra not using native methods

It seems that zypper only has version 3.1 of jna, while Cassandra wants 3.2.7.

I grabbed a copy here, and now it works like a charm.

When I start Cassandra server, two processes start running. Is this normal?

Yes, this is normal. We use jsvc to daemonize cleanly.

Cassandra Startup failure on ARM64 machine (java.lang.NoClassDefFoundError: Could not initialize class com.sun.jna.Native)

Seems you have hit similar issue as JNA link issue while starting cassandra RHEL 6.5

You can try:

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"


Related Topics



Leave a reply



Submit