Bug 534839 (RHQ-1597) - NPE in AgentServerComponent when looking for launcher script
Summary: NPE in AgentServerComponent when looking for launcher script
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: RHQ-1597
Product: RHQ Project
Classification: Other
Component: Plugins
Version: 1.2
Hardware: All
OS: All
low
medium
Target Milestone: ---
: ---
Assignee: RHQ Project Maintainer
QA Contact:
URL: http://jira.rhq-project.org/browse/RH...
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2009-02-18 14:32 UTC by Heiko W. Rupp
Modified: 2013-09-02 07:22 UTC (History)
3 users (show)

Fixed In Version: 1.4
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-09-02 07:22:00 UTC
Embargoed:


Attachments (Terms of Use)

Description Heiko W. Rupp 2009-02-18 14:32:00 UTC
from agent.log:

2009-02-18 13:52:36,901 ERROR [InventoryManager.discovery-1] (org.rhq.plugins.ag
ent.AgentLauncherScriptDiscoveryComponent)- An error occurred while attempting to auto-discover the agent's launcher script
java.lang.NullPointerException
        at org.rhq.plugins.agent.AgentServerComponent.getAgentBean(AgentServerComponent.java:93)
 at org.rhq.plugins.agent.AgentLauncherScriptDiscoveryComponent.discoverResources(AgentLauncherScriptDiscoveryComponent.java:69)

This is because AgentServerComponent.getAgentBean() never checks if the returned EMS connection is valid or not. Unfortunately this method is used in a lot of places.

Comment 1 John Mazzitelli 2009-02-18 15:01:14 UTC
that should never fail - the MBean is internal to the agent itself - there is no remote connection involved. Need to look at this problem more closely - this is bad if this MBean could not be retrieved.

Comment 2 Corey Welton 2009-08-26 18:59:43 UTC
Pushed to 1.4

Comment 3 Red Hat Bugzilla 2009-11-10 20:36:25 UTC
This bug was previously known as http://jira.rhq-project.org/browse/RHQ-1597


Comment 4 Corey Welton 2010-08-30 17:26:18 UTC
Mazz -- need to investigate if/why this is still happening.

Comment 5 John Mazzitelli 2010-08-30 17:48:24 UTC
I saw we close this as "cannot replicate". No one has seen this in a long time AFAIK. This situation is possible because we always allow the component to start, even if the JMX connection fails to be made - you'd see this in the log file as a WARN level msg:

Unable to connect to JMX Server

But if this happens, you have more to worry about than a NPE because it means you can't connect to a LOCAL, INTRA-VM MBean. If that ever happens, something really really bad is happening that probably isn't recoverable.

That said, I know of no one reporting this since this one incident - so its possible the agent VM was in a bad state when this happened.

I would close this - if it ever happens again, we'd reopen and investigate for but now I would assume its an anomaly.

Comment 6 Sunil Kondkar 2010-10-25 07:57:06 UTC
Verified on RHQ build#446

The agent log does not display the error. Marking the bug as verified.

Comment 7 Heiko W. Rupp 2013-09-02 07:22:00 UTC
Bulk closing of issues that were VERIFIED, had no target release and where the status changed more than a year ago.


Note You need to log in before you can comment on or make changes to this bug.