JNA link issue while starting cassandra RHEL 6.5

后端 未结 1 1176
轻奢々
轻奢々 2021-01-04 06:16

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

相关标签:
1条回答
  • 2021-01-04 06:41

    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"
    
    0 讨论(0)
提交回复
热议问题