Bug 1540527 - Exceptions in server and agent log after uninvetory of platform with storage node
Summary: Exceptions in server and agent log after uninvetory of platform with storage ...
Status: CLOSED ERRATA
Alias: None
Product: JBoss Operations Network
Classification: JBoss
Component: Inventory, Agent, Plugin -- Other
Version: JON 3.3.10
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ER01
: JON 3.3.11
Assignee: Michael Burman
QA Contact: Prachi
URL:
Whiteboard:
Keywords: Regression, Triaged
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-01-31 10:04 UTC by Filip Brychta
Modified: 2018-10-16 17:07 UTC (History)
3 users (show)

(edit)
Clone Of:
(edit)
Last Closed: 2018-10-16 17:06:49 UTC


Attachments (Terms of Use)
latest agent.log (192.78 KB, text/plain)
2018-09-19 13:44 UTC, Prachi
no flags Details


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2018:2930 None None None 2018-10-16 17:07 UTC

Description Filip Brychta 2018-01-31 10:04:07 UTC
Description of problem:
$Summary

Version-Release number of selected component (if applicable):
JON3.3.10

How reproducible:
Always

Steps to Reproduce:
1. install and start jon 3.3.10
2. uninventory whole platform contain storage node


Actual results:
in agent.log:
2018-01-31 04:58:04,044 ERROR [ResourceDiscoveryComponent.invoker.daemon-114] (org.rhq.plugins.agent.AgentDiscoveryComponent)- An error occurred while attempting to auto-discover the agent's own management interface
java.lang.NullPointerException
	at org.rhq.plugins.agent.AgentDiscoveryComponent.getResourceKey(AgentDiscoveryComponent.java:133)
	at org.rhq.plugins.agent.AgentDiscoveryComponent.discoverResources(AgentDiscoveryComponent.java:76)
	at sun.reflect.GeneratedMethodAccessor30.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at org.rhq.core.pc.util.DiscoveryComponentProxyFactory$ComponentInvocationThread.call(DiscoveryComponentProxyFactory.java:305)
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
	at java.lang.Thread.run(Thread.java:745)


in server.log:
11:20:56,488 ERROR [org.rhq.enterprise.server.alert.engine.internal.AlertConditionCacheCoordinator] (EJB default - 3) Could not find agent for scheduleId = 24669

Expected results:
NPE should be fixed. Not sure if the error in server.log is expected

Additional info:
NPE in agent log is visible even when uninventoring platform without storage node.
Error in server.log was visible only once, it's not visible when doing uninventory second time.

Comment 1 Filip Brychta 2018-02-02 16:49:41 UTC
The NPE is visible in JON 3.3.9 but the ERROR in server log is not -> it's a regression.

Comment 4 Michael Burman 2018-07-09 14:01:57 UTC
In the master:

commit 8c8f998a197e2aabe065772abbfa5820fb247ce1 (HEAD -> master)
Author: Michael Burman <miburman@redhat.com>
Date:   Mon Jul 9 17:01:28 2018 +0300

    [BZ 1540527] If parentResourceContext is not available, stop discovery of agent

Comment 7 Prachi 2018-09-19 13:43:24 UTC
Server log does not have any error, but in agent logs we can still see the error:

************************************
 ERROR [ResourceDiscoveryComponent.invoker.daemon-4] (org.rhq.plugins.agent.AgentDiscoveryComponent)- An error occurred while attempting to auto-discover the agent's own management interface
java.lang.NullPointerException
	at org.rhq.plugins.agent.AgentDiscoveryComponent.getResourceKey(AgentDiscoveryComponent.java:133)
	at org.rhq.plugins.agent.AgentDiscoveryComponent.discoverResources(AgentDiscoveryComponent.java:76)
	at sun.reflect.GeneratedMethodAccessor46.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at org.rhq.core.pc.util.DiscoveryComponentProxyFactory$ComponentInvocationThread.call(DiscoveryComponentProxyFactory.java:305)
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
	at java.lang.Thread.run(Thread.java:748)

************************************

Attached latest agent.log

Comment 8 Prachi 2018-09-19 13:44 UTC
Created attachment 1484734 [details]
latest agent.log

Comment 9 Michael Burman 2018-09-19 15:50:59 UTC
That line number is from an old release, so either the agent wasn't updated or the build is missing something. Lines should be 136 & 79 for the first two items in the stack trace (133 is empty line in the current release/jon3.3.x)

Comment 10 Filip Brychta 2018-09-20 06:09:30 UTC
Problem with co-located agent is that new plugins are not downloaded after upgrade until it's restarted or operation Update all plugins is manually executed.

When the agent has new plugins the issue is not visible -> marking as verified

Comment 12 errata-xmlrpc 2018-10-16 17:06:49 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHSA-2018:2930


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