Discovery of JBoss instance fails with NullPointerException when JBoss ON agent and JBoss instance have been started by different users

Solution Verified - Updated -

Issue

  • Agent's auto discovery process is failing to discover JBoss AS instance
  • The following error is displayed in agent's log:

    ERROR [ResourceDiscoveryComponent.invoker.daemon-2] (org.rhq.plugins.jbossas.JBossASDiscoveryComponent)- Failed to process JBoss AS command line: [...]
    java.lang.NullPointerException
            at org.rhq.core.system.ProcessInfo.getCurrentWorkingDirectory(ProcessInfo.java:373)
            at org.rhq.plugins.jbossas.helper.JBossInstanceInfo.<init>(JBossInstanceInfo.java:86)
            at org.rhq.plugins.jbossas.JBossASDiscoveryComponent.processAutoDiscoveredProcesses(JBossASDiscoveryComponent.java:101)
            at org.rhq.plugins.jbossas.JBossASDiscoveryComponent.discoverResources(JBossASDiscoveryComponent.java:86)
            at sun.reflect.GeneratedMethodAccessor36.invoke(Unknown Source)
            at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
            at java.lang.reflect.Method.invoke(Unknown Source)
            at org.rhq.core.pc.util.DiscoveryComponentProxyFactory$ComponentInvocationThread.call(DiscoveryComponentProxyFactory.java:266)
            at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
            at java.util.concurrent.FutureTask.run(Unknown Source)
            at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
            at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
            at java.lang.Thread.run(Unknown Source)</code>
    

Environment

  • JBoss Operations Network (ON) 2.2, 2.3
  • JBoss Enterprise Application Platform (EAP) 4.2, 4.3
  • Linux
  • User who started JBoss ON agent is different than user who started EAP instance

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.

Current Customers and Partners

Log in for full access

Log In
Close

Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.