9 Replies Latest reply on Apr 7, 2009 8:18 AM by cinaed

    JBoss AS discovery problem...

    cinaed

      Hi!

      The agent gets problem when discovering the JBoss AS and writes the error-message below in the agent.log file.

      Anyone seen this before/know whats this all about and/or have a solution for it?

      Thanks in advance,
      -Kenta

      2009-03-30 16:00:49,047 INFO [InventoryManager.discovery-1] (org.rhq.plugins.jbossas.JBossASDiscoveryComponent)- Discovering JBossAS 3.2.x and 4.x servers...
      2009-03-30 16:00:49,048 ERROR [InventoryManager.discovery-1] (org.rhq.plugins.jbossas.JBossASDiscoveryComponent)- Failed to process JBossAS command line: [../../jre1.5/bin/java, -server, -Djava.awt.headless=true, -Djava.library.path=../lib, -classpath, ../lib/wrapper.jar:../../jre1.5/lib/tools.jar:./run.jar, -Dwrapper.key=CI7Vp9H70QzasKop, -Dwrapper.port=32000, -Dwrapper.use_system_time=TRUE, -Dwrapper.version=3.1.2, -Dwrapper.native_library=wrapper, -Dwrapper.service=TRUE, -Dwrapper.cpu.timeout=10, -Dwrapper.jvmid=1, org.tanukisoftware.wrapper.WrapperSimpleApp, org.jboss.Main]
      java.lang.NullPointerException
       at org.rhq.plugins.jbossas.helper.JBossInstanceInfo.getHomeDir(JBossInstanceInfo.java:217)
       at org.rhq.plugins.jbossas.helper.JBossInstanceInfo.finalizeSysProps(JBossInstanceInfo.java:253)
       at org.rhq.plugins.jbossas.helper.JBossInstanceInfo.<init>(JBossInstanceInfo.java:84)
       at org.rhq.plugins.jbossas.JBossASDiscoveryComponent.processAutoDiscoveredProcesses(JBossASDiscoveryComponent.java:94)
       at org.rhq.plugins.jbossas.JBossASDiscoveryComponent.discoverResources(JBossASDiscoveryComponent.java:79)
       at org.rhq.core.pc.inventory.AutoDiscoveryExecutor.pluginDiscovery(AutoDiscoveryExecutor.java:197)
       at org.rhq.core.pc.inventory.AutoDiscoveryExecutor.call(AutoDiscoveryExecutor.java:103)
       at org.rhq.core.pc.inventory.AutoDiscoveryExecutor.run(AutoDiscoveryExecutor.java:92)
       at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:417)
       at java.util.concurrent.FutureTask$Sync.innerRunAndReset(FutureTask.java:280)
       at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:135)
       at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$101(ScheduledThreadPoolExecutor.java:65)
       at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.runPeriodic(ScheduledThreadPoolExecutor.java:142)
       at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:166)
       at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:650)
       at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:675)
       at java.lang.Thread.run(Thread.java:595)
      
      
      2009-03-30 16:00:49,050 ERROR [InventoryManager.discovery-1] (org.rhq.plugins.jbossas.JBossASDiscoveryComponent)- Failed to process JBossAS command line: [java, -Dprogram.name=run.sh, -server, -Xms1503m, -Xmx1503m, -Dsun.rmi.dgc.client.gcInterval=3600000, -Dsun.rmi.dgc.server.gcInterval=3600000, -XX:MaxPermSize=128m, -Dnetworkaddress.cache.ttl=3600, -Djava.net.preferIPv4Stack=true, -Djava.endorsed.dirs=/usr/jboss/jbossas/lib/endorsed, -classpath, /usr/jboss/jbossas/bin/run.jar, org.jboss.Main, -c, messaging, -b, <aHostname>]
      java.lang.NullPointerException
       at org.rhq.plugins.jbossas.helper.JBossInstanceInfo.getHomeDir(JBossInstanceInfo.java:217)
       at org.rhq.plugins.jbossas.helper.JBossInstanceInfo.finalizeSysProps(JBossInstanceInfo.java:253)
       at org.rhq.plugins.jbossas.helper.JBossInstanceInfo.<init>(JBossInstanceInfo.java:84)
       at org.rhq.plugins.jbossas.JBossASDiscoveryComponent.processAutoDiscoveredProcesses(JBossASDiscoveryComponent.java:94)
       at org.rhq.plugins.jbossas.JBossASDiscoveryComponent.discoverResources(JBossASDiscoveryComponent.java:79)
       at org.rhq.core.pc.inventory.AutoDiscoveryExecutor.pluginDiscovery(AutoDiscoveryExecutor.java:197)
       at org.rhq.core.pc.inventory.AutoDiscoveryExecutor.call(AutoDiscoveryExecutor.java:103)
       at org.rhq.core.pc.inventory.AutoDiscoveryExecutor.run(AutoDiscoveryExecutor.java:92)
       at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:417)
       at java.util.concurrent.FutureTask$Sync.innerRunAndReset(FutureTask.java:280)
       at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:135)
       at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$101(ScheduledThreadPoolExecutor.java:65)
       at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.runPeriodic(ScheduledThreadPoolExecutor.java:142)
       at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:166)
       at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:650)
       at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:675)
       at java.lang.Thread.run(Thread.java:595)
      


        • 1. Re: JBoss AS discovery problem...
          mazz

          Known issue and to be fixed in upcoming Jopr release. Please see JIRA:

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

          This is sort of related, just in case you hit this too:

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

          • 2. Re: JBoss AS discovery problem...
            cinaed

            Hi!
            Thanks for the answer.

            According to the JOPR-48 which says:
            "Did you run the agent without native enabled or is the JBossAS in a directory where the agent does not have any read/execute rights into?"

            Which directories/files must the agent have write and execute rights for?

            • 3. Re: JBoss AS discovery problem...
              cinaed

              Hi again!

              The https://jira.jboss.org/jira/browse/JOPR-1 refers to rev 32 and Jopr 2.2 release. The problem is we are using the supported JON 2.1.2.SP1 so the Jopr releases are not relevant for us. I have also opened up a support case at Redhat but in the meantime I was thinking about the https://jira.jboss.org/jira/browse/JOPR-48 which I referred to in my last reply. If that's a solution we would pass the problem faster.

              So again...do you know which directories/files the agent must have write and execute rights for?

              • 4. Re: JBoss AS discovery problem...
                pilhuhn

                This may be coming from running the AS as user Alice and the agent as user Bob where Alice!=Bob!=root
                Sigar library seems to have a restriction that Bob can see processes from Alice, but not their properties or something like this.

                rev 32 and the one in JOPR-48 do some more defensive coding and fall back to some "manual" detection of the directories if they can not be obtained through SIGAR.

                I don't really know why we don't get that data from SIGAR in the first place though.

                • 5. Re: JBoss AS discovery problem...
                  cinaed

                  Hi!

                  I'm running JBoss AS and the agent as two different users. I was able to manually add the JBoss AS through the JON Server Web GUI but still got those NullpointerExceptions in the agent-log. I don't know the impact of it yet but wonder about which user should run what. Is it recommended to have the same user running both resources and the agent or should it be ok to have different users for various resources and another user running the agent?



                  • 6. Re: JBoss AS discovery problem...
                    pilhuhn

                    Cinead,
                    do you see the NPEs with the latest Jopr 2.2 beta? If so, can you please append the complete stack trace(s) to JOPR-1 ?

                    Thanks
                    Heiko

                    • 7. Re: JBoss AS discovery problem...
                      cinaed

                      Hi,

                      well the problem is we are using the supported version JON 2.1.2.SP1 so I believe Jopr is not an option for us.

                      Thought about the https://jira.jboss.org/jira/browse/JOPR-48 which discuss the agents read/execute rights into the JBoss AS dirs. Maybe that's something to try out. If so...which dirs must the agent have read/execute rights into?

                      • 8. Re: JBoss AS discovery problem...
                        pilhuhn

                        That's ok :) I did just not understand if you still saw the issues with Jopr or not.
                        An upcoming version of JBoss ON is coming, but I don't have an exact release date. This version will contain the fixes from JOPR-1 and JOPR-48.

                        • 9. Re: JBoss AS discovery problem...
                          cinaed

                          Hi,

                          seems like I'll have to wait for the next JON release.
                          Anyhow...thanks for response and help this far.

                          -Kenta