11 Replies Latest reply on Jul 14, 2009 8:21 AM by Jannis Wienert

    jopr not collecting metrics

    Amit Patel Newbie

      Hi , I setup a new Jboss APP on a server and jopr found it , buts its not collecting any metrics, what do i DO?

        • 1. Re: jopr not collecting metrics
          Ian Springer Master

          When you say a JBoss APP, do you mean a JBoss Application Server instance or an application (e.g. a WAR)? If you mean an AS instance, one common reason for metrics not being collected is because the AS instance's JMX invoker is secured (i.e. requires authentication). If that is the case, you just need to go the Inventory>Connection tab of the JBossAS Resource in the JON GUI and set the "principal" and "credentials"connection properties to the username and password your JMX invoker requires.

          • 2. Re: jopr not collecting metrics
            Amit Patel Newbie

            thats not it, tried and still doesnt work

            • 3. Re: jopr not collecting metrics
              Ian Springer Master

              Did you import the AS Server Resource into inventory (from the Autodiscovery portlet on the Dashboard) as described here in the docs: http://jopr.org/confluence/display/JOPR2/Initial+Auto-discovery+and+Import ?

              • 4. Re: jopr not collecting metrics
                Jannis Wienert Newbie

                I got the exact same problem.

                I imported my JBOSS Instance and set the principle.
                My JMX Invoker is set correctly in jmx-invoker-service.xml.

                But the empbedded nor the standalone agent won't get data from my instance. What do i wrong?

                When i use telnet <ip-adress> <jnp port> i get an answer. also a test with my credentials is right.

                Out of my logfiles i also get no clue.

                Do you have any ideas how to solve it?

                regards
                wuschelz

                • 5. Re: jopr not collecting metrics
                  Jannis Wienert Newbie

                  Ok, i also made a twiddle with my credentials and jnp connection. that works.

                  I checked the logfiles, embedded-agent.log says:

                  client/jboss-common.jar] not found in directory:
                  , but when i search for it i can find it.

                  Another test that was suggested is reverse lookup. The information is correct in my case, means that the reverse adress matches the ip -adress and vice versa.

                  The only suggestion i got is, that it might have something to do with a symbolic link, that i use in our environment.

                  regards
                  wuschelz

                  • 6. Re: jopr not collecting metrics
                    Chatura kalansooriya Newbie

                    just try this in rhq-agent.sh and i also had smiler issue.

                    #RHQ_AGENT_BIN_DIR_PATH=`dirname "$_DOLLARZERO"`
                    RHQ_AGENT_BIN_DIR_PATH="<agent-home>/rhq-agent/bin"


                    • 7. Re: jopr not collecting metrics
                      Ian Springer Master

                      chatura02334,

                      Do you know why the:

                      RHQ_AGENT_BIN_DIR_PATH=`dirname "$_DOLLARZERO"`


                      line was not working? Could it not find the dirname command or was it something else? Also, what OS are you running the Agent on?

                      We'd like to fix rhq-agent.sh, so this modification isn't necessary.

                      Thanks,
                      Ian


                      • 8. Re: jopr not collecting metrics
                        mazz Master

                        on every UNIX platform I've seen, "dirname" is always available. It should be in all users' PATHs (/usr/bin typically, but perhaps /bin).

                        In short, you need to have SOME level of default shell capabilities to run Jopr. This includes needing the usual set of UNIX shell commands such as "dirname".

                        As for symbolic links, we did fix some issues dealign with JBossAS discovery and monitoring when the JBossAS server is installed and refereced via symbolic links.

                        https://jira.jboss.org/jira/browse/JOPR-206

                        I think this should be in the "resolved" state - we checked in a fix to trunk a while ago. I'll double check.

                        But go to JIRA and search for "symlink" or "symbolic link" and see what issues are around.

                        • 9. Re: jopr not collecting metrics
                          Chatura kalansooriya Newbie

                          Hi,
                          mazz is correct and i missed something in highlighted(#readlink...). As mazz mentioned symlink was the issue what i have to do in another way to avoid it.

                          thanks
                          Chatura.

                          • 10. Re: jopr not collecting metrics
                            Jannis Wienert Newbie

                            Hello Forum,

                            after i checked about the symlink i'am a step further.
                            I start run.sh from the installation directory.
                            No when he discovers the jboss instance i see, that he takes the path like /opt/jboss-4.2.2 etc.
                            And when i click on the instance without username password set he informs me about this (Invalid JMX credentials specified for connecting to this server).

                            But when i provide username and password he gets a class class cast exception:



                            Could not establish conne
                            ction to the JBoss AS instance [21] times for resource [/opt/jboss/jboss-4.2.2.GA/server/instanz_nobe_1]
                            java.lang.ClassCastException: javax.management.ObjectName cannot be cast to javax.management.ObjectName
                             at org.mc4j.ems.impl.jmx.connection.DConnection.loadSynchronous(DConnection.java:147)
                             at org.rhq.plugins.jbossas.JBossASServerComponent.loadConnection(JBossASServerComponent.java:1169)
                             at org.rhq.plugins.jbossas.JBossASServerComponent.getAvailability(JBossASServerComponent.java:284)
                             at sun.reflect.GeneratedMethodAccessor380.invoke(Unknown Source)
                             at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                             at java.lang.reflect.Method.invoke(Method.java:597)
                             at org.rhq.core.pc.inventory.ResourceContainer$ComponentInvocationThread.call(ResourceContainer.java:484)
                             at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
                             at java.util.concurrent.FutureTask.run(FutureTask.java:138)
                             at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
                             at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
                             at java.lang.Thread.run(Thread.java:619)


                            To be sure that it has nothing to do with the special instance naming i started it also with default instance.

                            Same problem.

                            Thanks for your hints and tipps.
                            wuschelz

                            • 11. Re: jopr not collecting metrics
                              Jannis Wienert Newbie

                              After disabling the embedded Agent and reconfiguring the standalone agent he now discovers the jboss instance....