安装了collectd-java还报找不到java.so

2016-12-04  本文已影响0人  风恋绝尘

当我们安装的collectd-java,就会生成java.so文件,但是重启collectd的时候却还是报找不到java.so文件是怎么回事呢,原来是collectd想找java 6版本的,为了修复这个bug,我们执行如下操作

安装yum install collectd-java
生成/usr/lib64/collectd/java.so文件,
重启systemctl restart collectd
报错:tail -f /var/log/collectd.log
lt_dlopen ("/usr/lib64/collectd/java.so") failed: file not found. The most common cause for this problem is missing dependencies. Use ldd(1) to check the dependencies of the plugin / shared object.

解决办法:
rm /usr/lib64/libjvm.so
ln -svf /m8/jdk/jdk1.8.0_101/jre/lib/amd64/server/libjvm.so /usr/lib64/libjvm.so
systemctl restart collectd

参考:https://community.rsa.com/thread/185477

是在安装hbase-collectd的时候解决的
因为10-jmx.conf文件里面有如下描述:

apt-get install collectd-java collectd-generic-jmx

If your collectd log shows an error loading java.so, see

http://www.willdurness.com/collectinggraphing-information-on-neo4j-via-collectd-and-graphite/

and how they setup LD_LIBRARY_PATH. The basic problem is

collectd wants open JDK 6. You can fix this by adding

export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/usr/lib/jvm/java-7-oracle/jre/lib/amd64/server

to your collectd init file, but pointing to the correct

library path for your java install.

上一篇 下一篇

猜你喜欢

热点阅读