Bug 1127928 - EAP6 resources which were in discovery queue before plugin update remain down after import due to BZ840403
Summary: EAP6 resources which were in discovery queue before plugin update remain down...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: JBoss Operations Network
Classification: JBoss
Component: Plugin -- JBoss EAP 6
Version: JON 3.2.2
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: ER01
: JON 3.3.0
Assignee: Larry O'Leary
QA Contact: Filip Brychta
URL:
Whiteboard:
Depends On:
Blocks: 1124767
TreeView+ depends on / blocked
 
Reported: 2014-08-07 21:35 UTC by Larry O'Leary
Modified: 2014-12-11 14:04 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of: 1124767
Environment:
Last Closed: 2014-12-11 14:04:23 UTC
Type: Bug


Attachments (Terms of Use)

Description Larry O'Leary 2014-08-07 21:35:53 UTC
+++ This bug was initially created as a clone of Bug #1124767 +++

Description of problem:
$Summary

Version-Release number of selected component (if applicable):
Version :	
3.2.0.GA Update 02
Build Number :	
dfe3e4b:cf4474c

How reproducible:
2/2

Steps to Reproduce:
1. install jon3.2.2 with agent which is monitoring EAP6
2. make sure that EAP6 resource is visible in discovery queue
3. install jon-plugin-pack-eap-3.2.0.GA-update-01
  a. unzip jon-plugin-pack-eap-3.2.0.GA-update-01.zip
  b. cp plugins/*.jar jon-server-3.2.0.GA/plugins/
  c. go to Administration->Agent Plugins->Scan For Updates
  d. when the scan is done, invoke 'Update All Plugins' operation on relevant agent
  e. import EAP6 resources from discovery queue

Actual results:
Resources are down and following error is visible in agent.log:

2014-07-30 04:05:45,462 WARN  [InventoryManager.availability-1] (rhq.core.pc.inventory.AvailabilityExecutor)- Availability collection failed with exception on Resource[id=10092, uuid=8ab41f8c-fe54-4895-8e40-b4c649f85069, type={JBossAS7}JBossAS7 Host Controller, key=hostConfig: /home/hudson/jboss-eap6-domain/domain/configuration/host-changed.xml, name=EAP Domain Controller (0.0.0.0:8990), parent=fbr-eap6-2.bc.jonqe.lab.eng.bos.redhat.com, version=EAP 6.2.4.GA], availability will be reported as DOWN
org.rhq.core.clientapi.agent.PluginContainerException: Failed to start component for resource Resource[id=10092, uuid=8ab41f8c-fe54-4895-8e40-b4c649f85069, type={JBossAS7}JBossAS7 Host Controller, key=hostConfig: /home/hudson/jboss-eap6-domain/domain/configuration/host-changed.xml, name=EAP Domain Controller (0.0.0.0:8990), parent=fbr-eap6-2.bc.jonqe.lab.eng.bos.redhat.com, version=EAP 6.2.4.GA].
	at org.rhq.core.pc.inventory.InventoryManager.activateResource(InventoryManager.java:1943)
	at org.rhq.core.pc.inventory.AvailabilityExecutor.checkInventory(AvailabilityExecutor.java:361)
	at org.rhq.core.pc.inventory.AvailabilityExecutor.checkInventory(AvailabilityExecutor.java:429)
	at org.rhq.core.pc.inventory.AvailabilityExecutor.startScan(AvailabilityExecutor.java:195)
	at org.rhq.core.pc.inventory.AvailabilityExecutor.call(AvailabilityExecutor.java:152)
	at org.rhq.core.pc.inventory.AvailabilityExecutor.run(AvailabilityExecutor.java:111)
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
	at java.util.concurrent.FutureTask$Sync.innerRunAndReset(FutureTask.java:351)
	at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:178)
	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:178)
	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
	at java.lang.Thread.run(Thread.java:722)
Caused by: java.lang.IllegalArgumentException: name is null
	at org.rhq.modules.plugins.jbossas7.helper.TrustStrategy.findByName(TrustStrategy.java:36)
	at org.rhq.modules.plugins.jbossas7.helper.ServerPluginConfiguration.getTrustStrategy(ServerPluginConfiguration.java:183)
	at org.rhq.modules.plugins.jbossas7.ASConnectionParams.createFrom(ASConnectionParams.java:84)
	at org.rhq.modules.plugins.jbossas7.BaseServerComponent.start(BaseServerComponent.java:108)
	at sun.reflect.GeneratedMethodAccessor45.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:601)
	at org.rhq.core.pc.inventory.ResourceContainer$ComponentInvocation.call(ResourceContainer.java:654)
	at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
	at java.util.concurrent.FutureTask.run(FutureTask.java:166)
	... 3 more

Expected results:
Resources are up without errors

Additional info:
It seems that this issue doesn't affect already imported EAP6 resources (tried that twice).
Workaround: uninventory affected resources and import them again

--- Additional comment from Thomas Segismont on 2014-08-01 06:40:48 EDT ---

Filip, does this issue apply to SSL protected EAP6 servers only or to all kind of servers?

--- Additional comment from Filip Brychta on 2014-08-01 08:26:27 EDT ---

It affects all kinds of servers. Easiest way to reproduce is to use RHQ server resource:

2014-08-01 08:23:32,602 ERROR [RHQ Agent Plugin Container Restart Thread] (rhq.core.pc.inventory.InventoryManager)- Exception thrown while activating [Resource[id=10003, uuid=bbae12ff-e7f6-4538-a8ac-5ea89c8971d1, type={JBossAS7}JBossAS7 Standalone Server, key=hostConfig: /home/hudson/jon-server-3.2.0.GA/jbossas/standalone/configuration/standalone-full.xml, name=EAP (127.0.0.1:6990) RHQ Server, parent=fbr-jon322.bc.jonqe.lab.eng.bos.redhat.com, version=EAP 6.1.1.GA]].
org.rhq.core.clientapi.agent.PluginContainerException: Failed to start component for resource Resource[id=10003, uuid=bbae12ff-e7f6-4538-a8ac-5ea89c8971d1, type={JBossAS7}JBossAS7 Standalone Server, key=hostConfig: /home/hudson/jon-server-3.2.0.GA/jbossas/standalone/configuration/standalone-full.xml, name=EAP (127.0.0.1:6990) RHQ Server, parent=fbr-jon322.bc.jonqe.lab.eng.bos.redhat.com, version=EAP 6.1.1.GA].

Comment 1 Larry O'Leary 2014-08-07 21:37:08 UTC
Ready for review and merge in PR: https://github.com/rhq-project/rhq/pull/107

Comment 2 Larry O'Leary 2014-08-07 21:42:11 UTC
Above is for 3.3 branch. Master is here: https://github.com/rhq-project/rhq/pull/108

Comment 3 Larry O'Leary 2014-08-08 18:39:08 UTC
Merged to release/jon3.3.x as commit: https://github.com/rhq-project/rhq/commit/ddac4aef37858ff36e3b2abfb78466cac400c154

Merged to master as commit: https://github.com/rhq-project/rhq/commit/425e3b8e261d0a79986470ec34dd23f6d88c2faf

commit 425e3b8e261d0a79986470ec34dd23f6d88c2faf
Author: Larry O'Leary <loleary@redhat.com>
Date:   Thu Aug 7 12:20:05 2014 -0500

    BZ-1124767: Setting appropriate defaults for new properties trustStrategy and hostnameVerification introduced in BZ-1062552.
    
    These defaults are used when the property is loaded from the resource's
    plug-in configuration. This is necessary to handle situations in where a
    resource was already in inventory when the new plug-in is installed.

Comment 4 Simeon Pinder 2014-08-19 23:50:46 UTC
Moving to ON_QA as available to test in the following brew build:

https://brewweb.devel.redhat.com//buildinfo?buildID=379025

Comment 5 Filip Brychta 2014-08-26 11:13:20 UTC
Verified on
Version :	
3.3.0.ER01.1
Build Number :	
9941660:f3aa7e7


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