ActiveMQ
  1. ActiveMQ
  2. AMQ-4247

Jolokia error in latest 5.8 snapshot

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None
    • Environment:

      activemq-5.8-20130105.031543-65

      Description

      Using the latest ActiveMQ 5.8 snapshot, I'm getting errors when trying to access /j4p:

      HTTP ERROR 503

      Problem accessing /j4p/. Reason:

      java.lang.IllegalStateException: Cannot load extractor org.jolokia.converter.json.simplifier.ClassSimplifier defined in jar:file:/usr/activemq/lib/web/jolokia-core-1.0.6.jar!/META-INF/simplifiers-default : java.lang.ClassCastException: org.jolokia.converter.json.simplifier.ClassSimplifier cannot be cast to org.jmx4perl.converter.json.Extractor. Aborting

      Is this a known problem? Is there any documentation on how to use and/or configure Jolokia with ActiveMQ?

        Activity

        Hide
        Dejan Bosanac added a comment -

        Hi Lionel,

        I can reproduce this. What are you trying to access at j4p? There's a brief explanation how to access ActiveMQ MBean information using Jolokia here

        http://activemq.apache.org/rest.html#REST-RestManagement

        For more info on url syntax, take a look at Jolokia manual.

        Show
        Dejan Bosanac added a comment - Hi Lionel, I can reproduce this. What are you trying to access at j4p? There's a brief explanation how to access ActiveMQ MBean information using Jolokia here http://activemq.apache.org/rest.html#REST-RestManagement For more info on url syntax, take a look at Jolokia manual.
        Hide
        Lionel Cons added a comment -

        Dejan,

        Thanks for your reply and the link to some doc.

        The error came in fact from an old installation on jmx4perl (agent). I've now cleaned it. The /j4p/ path is because we use a proxy with this path, ActiveMQ is queried with /api/jolokia/.

        I can now access JMX information via Jolokia but I still have two problems.

        (1) I tried to use $

        {activemq.conf} in web.xml to specify which access file Jolokia should use but this syntax does not seem to be accepted. Is there a way to put Java property names in web.xml? IMHO, it would make sense to configure Jolokia from files under ${activemq.conf}

        .

        (2) It seems the MBean paths have changed and this kills our Nagios monitoring. For instance, to get the broker version, we have to use:

        • for ActiveMQ 5.5: org.apache.activemq:Type=Broker,BrokerName=<name>
        • for ActiveMQ 5.8: org.apache.activemq:type=Broker,brokerName=<name>
          Is this case change intentional?
        Show
        Lionel Cons added a comment - Dejan, Thanks for your reply and the link to some doc. The error came in fact from an old installation on jmx4perl (agent). I've now cleaned it. The /j4p/ path is because we use a proxy with this path, ActiveMQ is queried with /api/jolokia/. I can now access JMX information via Jolokia but I still have two problems. (1) I tried to use $ {activemq.conf} in web.xml to specify which access file Jolokia should use but this syntax does not seem to be accepted. Is there a way to put Java property names in web.xml? IMHO, it would make sense to configure Jolokia from files under ${activemq.conf} . (2) It seems the MBean paths have changed and this kills our Nagios monitoring. For instance, to get the broker version, we have to use: for ActiveMQ 5.5: org.apache.activemq:Type=Broker,BrokerName=<name> for ActiveMQ 5.8: org.apache.activemq:type=Broker,brokerName=<name> Is this case change intentional?
        Hide
        Lionel Cons added a comment -

        In fact, there is a third problem, linked to MBean names too.

        In 5.5, we can see: org.apache.activemq:BrokerName=<name>,Type=Queue,Destination=ActiveMQ.DLQ
        But in 5.8: org.apache.activemq:type=Broker,brokerName=<name>,destinationType=Queue,destinationName=ActiveMQ.DLQ

        Why do we have type=Broker for a queue?

        Show
        Lionel Cons added a comment - In fact, there is a third problem, linked to MBean names too. In 5.5, we can see: org.apache.activemq:BrokerName=<name>,Type=Queue,Destination=ActiveMQ.DLQ But in 5.8: org.apache.activemq:type=Broker,brokerName=<name>,destinationType=Queue,destinationName=ActiveMQ.DLQ Why do we have type=Broker for a queue?
        Hide
        Timothy Bish added a comment -

        The change is intentional, see AMQ-4237.

        Show
        Timothy Bish added a comment - The change is intentional, see AMQ-4237 .
        Hide
        Dejan Bosanac added a comment -

        As for the (1) I don't know of a way to use system properties in web.xml, but I think you can achieve the same using classpath:, as conf/ folder is in the classpath.

        Show
        Dejan Bosanac added a comment - As for the (1) I don't know of a way to use system properties in web.xml, but I think you can achieve the same using classpath:, as conf/ folder is in the classpath.
        Hide
        Lionel Cons added a comment -

        Dejan, I will investigate further but it seems that conf is not in the classpath. We use the service wrapper and your conf/wrapper.conf contains only:

        wrapper.java.classpath.1=%ACTIVEMQ_HOME%/bin/wrapper.jar
        wrapper.java.classpath.2=%ACTIVEMQ_HOME%/bin/activemq.jar

        Show
        Lionel Cons added a comment - Dejan, I will investigate further but it seems that conf is not in the classpath. We use the service wrapper and your conf/wrapper.conf contains only: wrapper.java.classpath.1=%ACTIVEMQ_HOME%/bin/wrapper.jar wrapper.java.classpath.2=%ACTIVEMQ_HOME%/bin/activemq.jar
        Hide
        Lionel Cons added a comment -

        In fact, even with the Java service wrapper, $

        {activemq.conf} is indeed in the classpath so a value of "classpath:foo" indeed points to "foo" under ${activemq.conf}

        . Thanks!

        Show
        Lionel Cons added a comment - In fact, even with the Java service wrapper, $ {activemq.conf} is indeed in the classpath so a value of "classpath:foo" indeed points to "foo" under ${activemq.conf} . Thanks!
        Hide
        Lionel Cons added a comment -

        With the classpath: prefix trick I can now use Jolokia without problems.

        The only thing left is the MBean names changes but this is being tracked/discussed in AMQ-4237.

        Show
        Lionel Cons added a comment - With the classpath: prefix trick I can now use Jolokia without problems. The only thing left is the MBean names changes but this is being tracked/discussed in AMQ-4237 .
        Hide
        Dejan Bosanac added a comment -

        Hi Lionel, thanks for closing the loop.

        Show
        Dejan Bosanac added a comment - Hi Lionel, thanks for closing the loop.

          People

          • Assignee:
            Unassigned
            Reporter:
            Lionel Cons
          • Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development