Archived community.zenoss.org | full text search
Skip navigation
1114 Views 2 Replies Latest reply: Nov 6, 2013 6:28 AM by thomas RSS
jprokay Newbie 1 posts since
Sep 10, 2013
Currently Being Moderated

Sep 19, 2013 2:18 PM

Using Remoting-JMX with ZenJMX

I pulled down and successfully installed the latest ZenJMX Zenpack which has support for remoting-jmx (ZenPacks.zenoss.ZenJMX-3.11.0-py2.7.egg | https://github.com/zenoss/ZenPacks.zenoss.ZenJMX). However, getting it to work with the new protocol is not documented.

Looking at the code for the commit that adds that support, a folder is created called ${ZENOSS_HOME}/zenjmx-libs and it pulls JARs from this folder. The JARs needed are also not documented. Currently, I have the following JAR in that folder: remoting-jmx-1.1.0.Final-redhat-1.jar

This did not enable remoting-jmx support. I instead received this error:

2013-09-19 18:12:30,203 DEBUG zen.zenjmx: Finished with result [Failure instance: Traceback: <class 'xmlrpclib.Fault'>: <Fault 0: "Failed to invoke method collect in class com.zenoss.zenpacks.zenjmx.ZenJmxService: Format specifier '3$s'">

/opt/zenoss/lib/python/twisted/internet/posixbase.py:253:_disconnectSelectable

/opt/zenoss/lib/python/twisted/internet/tcp.py:720:connectionLost

/opt/zenoss/lib/python/twisted/internet/tcp.py:529:connectionLost

/opt/zenoss/lib/python/twisted/web/xmlrpc.py:363:connectionLost

--- <exception caught here> ---

/opt/zenoss/lib/python/twisted/web/xmlrpc.py:434:parseResponse

/opt/zenoss/lib/python2.7/xmlrpclib.py:1194:loads

/opt/zenoss/lib/python2.7/xmlrpclib.py:850:close

 

 

Thoughts on how to get this working?

  • thomas Rank: Green Belt 127 posts since
    Apr 21, 2008
    Currently Being Moderated
    1. Nov 5, 2013 5:18 AM (in response to jprokay)
    Re: Using Remoting-JMX with ZenJMX

    I found the same problem when started to monitor JBOSS 7 processes via Remoting JMX, and I discovered an apparent bug in the Zenpack, more specific this file:

     

    ZenPacks/zenoss/ZenJMX/src/main/java/com/zenoss/zenpacks/zenjmx/ZenJmxService.java

     

    (source can be found here: https://github.com/zenoss/ZenPacks.zenoss.ZenJMX)

     

    Line 285:

     

          String errorMsg = "%1$s; Exception %3$s ";

          errorMsg = String.format(errorMsg, msg,e.getMessage());

    Should be

     

          String errorMsg = "%1$s; Exception %2$s ";

          errorMsg = String.format(errorMsg, msg,e.getMessage());

     

    But now I'm getting an event: 

     

    Unexpected Error; Exception Operation failed with status WAITING

     

    So something is still not right :-(

  • thomas Rank: Green Belt 127 posts since
    Apr 21, 2008
    Currently Being Moderated
    2. Nov 6, 2013 6:28 AM (in response to thomas)
    Re: Using Remoting-JMX with ZenJMX

    Uhmm now I noticed that I actually still got this exception, så my fix is not correct... instead I discovered that I was trying to use remoting-jmx against a Java which did not support remoting-jmx... (was communicating with the wrong jboss instance).

     

    After I changed my template, I managed to get it working, I'm on Zenoss 4.2.4 and using the latest ZenJMX.

More Like This

  • Retrieving data ...

Legend

  • Correct Answers - 4 points
  • Helpful Answers - 2 points