How to get the reason for failed to load SIGAR

Continuing the discussion from Failed to load SIGAR:

also i noted that there should also a LOG.debug just after the LOG.info to tell the reason why failed to load SIGAR. but i have not got this in IntelliJ IDEA, why ?:

    @Inject
    public SigarService() {
        Sigar sigar = null;
        try {
            sigar = new Sigar();
            Sigar.load();
            LOG.debug("Successfully loaded SIGAR {}", Sigar.VERSION_STRING);
        } catch (Throwable t) {
            LOG.info("Failed to load SIGAR. Falling back to JMX implementations.");
            LOG.debug("Reason for SIGAR loading failure", t);
...

eventually i found out the root reason:

org.hyperic.sigar.SigarException: no libsigar-amd64-linux.so in java.library.path

i fixed this by copy libsigar-amd64-linux.so into /usr/lib64 by:

cp ./graylog-project-repos/graylog2-server/lib/sigar-1.6.4 /usr/lib64/libsigar-amd64-linux.so
chmod 744 /usr/lib64/libsigar-amd64-linux.so

but it seems that copy to /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.212.b04-0.el7_6.x86_64/lib/amd64 does not work.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.