Check if JNA is enabled in Cassandra

I know from other posts that Cassandra writes a warning in the log files if JNA is not configured properly. My log files (cassandra.log and system.log) do not contain the word "jna" (all verified cases). Can I assume that JNA is configured correctly for my Cassandra instance?

Is there a way to check if the JNA configuration is correct?

+6
source share
2 answers

If JNA is configured correctly, you should see a message in your log as follows:

INFO [main] 2014-06-06 15:55:11,664 CLibrary.java (line 121) JNA mlockall successful 

Also, in your journal, the JNA library should appear in your classpath output:

 INFO [main] 2014-06-06 16:47:13,318 CassandraDaemon.java (line 191) Classpath:... ....:/usr/share/java/jna.jar: 
+4
source

Below is the code that displays an error if JNA skips:

  try { Native.register("c"); } catch (NoClassDefFoundError e) { logger.warn("JNA not found. Native methods will be disabled."); jnaAvailable = false; } catch (UnsatisfiedLinkError e) { logger.warn("JNA link failure, one or more native method will be unavailable."); logger.debug("JNA link failure details: {}", e.getMessage()); } catch (NoSuchMethodError e) { logger.warn("Obsolete version of JNA present; unable to register C library. Upgrade to JNA 3.2.7 or later"); jnaAvailable = false; } 

So, just copy your logs for one of the above.

+3
source

Source: https://habr.com/ru/post/979411/


All Articles