Announcement Announcement Module
Collapse
No announcement yet.
AMS : JMX communication with JBoss 4.3 Page Title Module
Move Remove Collapse
This topic is closed
X
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • AMS : JMX communication with JBoss 4.3

    Hello,

    I'm trying to import via JMX the metrics JMX metrics from the embedded Tomcat6 webapps. I use an instrumented version of Spring and thus would like to import it into AMS.

    Specifically I'm having the following error from the agent :

    Code:
    ERROR [Thread-0] [MeasurementCommandsServer] Error getting real time measurement: Invalid request: Can't initialize remote connector: Invalid JMX URL port: rmi
    With the jmxUrl :
    Code:
    service:jmx:rmi:///jndi/rmi://localhost:10777/jmxrmi
    This URL works perfectly fine with JConsole, the URL format looks correct according to the AMS documentation. I really can't understand this error.

    I'm using those products :
    * AMS Version 2.0.0.SR02 (build #677 - Aug 06, 2009 - )
    * JBoss 4.3-CP04, started with these parameters :
    Code:
    -Dcom.sun.management.jmxremote.port=10777 -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false

    Let me know if you need more details.

    Thanks!

  • #2
    OK I really don't get it, the jmxUrl seems fine with something like http://localhost:8080 (so I assume it gets info from the monitoring servlet) but yields an error with an URL like service:jmx:rmi... which is exactly what is specified in the documentation !

    I can only monitor my webapps, I don't get any JMX related info.

    Any clue ?

    Comment


    • #3
      The JMX metrics from your instrumented Spring app should show up under the JBoss server, not the embedded Tomcat. We recently discovered that you must perform the following workaround to enable AMS or HQ to discover these MBeans in JBoss:

      JBoss converts ModelMBeans when they are deployed to the MBeanServer. The fastest way to fix this is to edit JBOSS_HOME/server/default/deploy/jmx-invoker-service.xml by commenting out the following entry towards the bottom of the file:

      <!-- Interceptor that deals with non-serializable results -->
      <!--><interceptor code="org.jboss.jmx.connector.invoker.Serializable Interceptor"
      policyClass="StripModelMBeanInfoPolicy"/> -->

      I apologize for the inconvenience. We are working on resolving this in a future HQ release.

      Comment


      • #4
        Thanks jencompgeek for your answer, but I still can't make it work...

        It's fine with tc Server (of course) : I can see my Spring Web application and monitor it but no luck with JBoss.

        So far I've tested and failed with all those versions :
        - JBoss 4.0.5
        - JBoss 4.2.2
        - JBoss 4.3 CP04

        I'm not sure what should I do next to find out what's wrong.

        Comment


        • #5
          Try starting JBoss without the -Dcom.sun.management.jmxremote.port=10777, etc. AMS uses JNP to connect to the JBoss MBeanServer (those jmxremote props are not used). I've heard someone else say recently that they couldn't access the Spring MBeans when they added the above sys props in JBoss, but once they took them out it worked. I haven't had a chance to look into it yet. If you take the jmxremote props out, you should still see MBeans in the "spring.application" domain from the JBoss JMX Console. Assuming you see them there, AMS should pick them up once you restart the agent.

          Comment


          • #6
            Hmm I dont see the spring.application domain in the JBoss' JMX console this could be it, thanks for the tip I'm gonna investigate.

            Comment


            • #7
              @jencompgeek you rock!

              Activating the remote JMX options on the JVM indeed prevented the spring.application MBean to show up in JBoss' JMX console. It works now.

              Last question : how should I add a new "Sun JVM 1.5" server now that I removed the JMX exposition ?

              Comment

              Working...
              X