[collectd] java plugin load issue

martin martin at uncommonsense-uk.com
Thu Nov 8 16:52:01 CET 2012


Hi Poil,

You were spot on I did this a few days ago and it showed that libjvm.so was not found i.e. broken. 


The problem was that I was using the Oracle JDK instead of the OpenJDK installation.


What I've done is modify my existing tomcat  installation to point to the Oracle JDK and install the Java 1.7 OpenJDK and let collectd use that.


Cheers


-Martin





---- On Wed, 07 Nov 2012 19:26:56 +0000 Poil<poil at quake.fr> wrote ---- 


  Hi,
 
 what's this command return ?
 
 ldd /var/lib64/collectd/java.so
 
 Best regards, 
 Le 01/11/2012 18:35, martin a écrit :
 
  Hi all,   
 
 
 
 
 I wonder if someone can help me I'm migrating from jmxtrans to collectd-java/genericjmx, I've configured it as follows but I'm getting a "Found a configuration for the `java' plugin, but the plugin isn't loaded or didn't register a configuration callback." error
 
 
 ---Start Here
  # cat collectd5.conf
 BaseDir     "/var/lib/collectd5"
 PIDFile     "/var/run/collectd5.pid"
 LoadPlugin syslog
 LoadPlugin cpu
 LoadPlugin interface
 LoadPlugin load
 LoadPlugin memory
 Include "/etc/collectd5.d/*.conf"
 
 
 # cat collectd5.d/graphite.conf 
 LoadPlugin write_graphite
 
 
 <Plugin write_graphite>
   <Carbon>
     Host "myhost1"
     Port "2003"
     Prefix "collectd."
     StoreRates false
     AlwaysAppendDS false
     EscapeCharacter "_"
   </Carbon>
 </Plugin>
 
 
 # cat collectd5.d/genericjmx.conf 
 LoadPlugin java
 
 
 <Plugin "java">
   JVMARG "-Djava.class.path=/usr/share/collectd/java"
   LoadPlugin "org.collectd.java.GenericJMX"
   <Plugin "GenericJMX">
     <MBean "memory_pool">
       ObjectName "java.lang:type=MemoryPool,*"
       InstancePrefix "memory_pool-"
       InstanceFrom "name"
       <Value>
         Type "memory"
         #InstancePrefix ""
         #InstanceFrom ""
         Table true
         Attribute "Usage"
       </Value>
     </MBean>
     <Connection>
       ServiceURL "service:jmx:rmi:///jndi/rmi://localhost:8686/jmxrmi"
       Host "vmapp1"
       Collect "memory_pool"
     </Connection>
   </Plugin>
 </Plugin>
 
 --end here
 
 
 I've got collectd-java and multiple versions of java installed i.e.
 
 
 # rpm -ql collectd-java
 /usr/lib64/collectd/java.so
 /usr/share/collectd/java
 /usr/share/collectd/java/collectd-api.jar
 /usr/share/collectd/java/generic-jmx.jar
 /usr/share/man/man5/collectd-java.5.gz
 # rpm -qa | grep -i -e java -e jre -e jdk
 collectd-java-5.1.0-1.el6.x86_64
 java-1.7.0-openjdk-1.7.0.3-2.1.el6.7.x86_64
 java-1.5.0-gcj-1.5.0.0-29.1.el6.x86_64
 jre-1.7.0_07-fcs.x86_64
 java-1.6.0-openjdk-1.6.0.0-1.45.1.11.1.el6.x86_64
 gcc-java-4.4.6-3.el6.x86_64
 jdk-1.7.0_07-fcs.x86_64
 
 
 but I get the following errors:
  Nov  1 17:33:14 ip-10-39-3-223 collectd[20610]: collectd: Stopping 5 read threads.
 Nov  1 17:33:14 ip-10-39-3-223 collectd[20809]: Found a configuration for the `java' plugin, but the plugin isn't loaded or didn't register a configuration callback.
 Nov  1 17:33:14 ip-10-39-3-223 collectd[20809]: Found a configuration for the `java' plugin, but the plugin isn't loaded or didn't register a configuration callback.
 Nov  1 17:33:14 ip-10-39-3-223 collectd[20809]: There is a `Plugin' block within the configuration for the java plugin. The plugin either only expects "simple" configuration statements or wasn't loaded using `LoadPlugin'. Please check your configuration.
 Nov  1 17:33:14 ip-10-39-3-223 collectd[20810]: Initialization complete, entering read-loop.
 
 
 
  # collectd5 -t
 Could not find plugin java.
 # collectd5 -T
 Could not find plugin java.
 
 
 
 Can anyone help me fix this?
 
 
 -Martin
 
 
  
 _______________________________________________ collectd mailing list collectd at verplant.org http://mailman.verplant.org/listinfo/collectd   
 



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.verplant.org/pipermail/collectd/attachments/20121108/3aa92e11/attachment.html>


More information about the collectd mailing list