Bug 1312137

Summary: Attempting to import EAP 6.4 when EAP 7 running on same host is already in inventory fails with NPE
Product: [JBoss] JBoss Operations Network Reporter: Matt Mahoney <mmahoney>
Component: Plugin -- JBoss EAP 6Assignee: Simeon Pinder <spinder>
Status: CLOSED CURRENTRELEASE QA Contact: Vojta Prusa <vprusa>
Severity: high Docs Contact:
Priority: high    
Version: JON 3.3.5CC: fbrychta, loleary, miburman, mmahoney, vprusa
Target Milestone: DR02Keywords: Triaged
Target Release: One-off release   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-09-01 09:03:00 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Bug Depends On:    
Bug Blocks: 1261060, 1261062, 1261066, 1273531, 1289370, 1300725, 1302426, 1319889, 1319904, 1319945    
Attachments:
Description Flags
Server.log none

Description Matt Mahoney 2016-02-25 20:27:06 UTC
Description of problem:


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


How reproducible:


Steps to Reproduce:
1. Create JON Agent with EAP 7.0
2. Import & Inventory EAP 7.0
3. Install EAP6.4.0 on agent server with EAP 7.0
Ex: /root/jon-utils/src/main/scripts/bladecenter/install_eap6-standalone.sh http://download.devel.redhat.com/released/JBEAP-6/6.4.0/jboss-eap-6.4.0.zip
4. Import and inventory EAP 6.4.0

Actual results:
Status in Error state - NullPointerException (see stack trace below)

Expected results:
EAP 6.4 should inventory with no errors.

Additional info:
java.lang.NullPointerException
	at org.rhq.modules.plugins.jbossas7.BaseServerComponent.getStartScriptFile(BaseServerComponent.java:572)
	at org.rhq.modules.plugins.jbossas7.BaseServerComponent.validateStartScriptPluginConfigProps(BaseServerComponent.java:551)
	at org.rhq.modules.plugins.jbossas7.BaseServerComponent.restartServer(BaseServerComponent.java:350)
	at org.rhq.modules.plugins.jbossas7.StandaloneASComponent.invokeOperation(StandaloneASComponent.java:192)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:483)
	at org.rhq.core.pc.inventory.ResourceContainer$ComponentInvocation.call(ResourceContainer.java:759)
	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)

Comment 1 Michael Burman 2016-02-29 13:36:02 UTC
mm, I can't replicate this, this doesn't make sense because NPE is checked and this should happen with EAP6.4 / EAP6.4 combination also (EAP7 makes no difference here).

Comment 2 Michael Burman 2016-02-29 13:43:58 UTC
Right, which version of JON is used here?

Comment 3 Matt Mahoney 2016-02-29 19:15:41 UTC
Created attachment 1131672 [details]
Server.log

Comment 5 Filip Brychta 2016-03-07 16:39:34 UTC
This should be resolved by bz1314384 -> changing state to modified

Comment 7 Vojta Prusa 2016-03-10 12:55:17 UTC
AP plugin Update-03 DR02 does not support EAP7:

After following steps 1.-4. EAP6 resource is UP and EAP7 resource shows:

It was necessary to set port offset for EAP6 and restart Agent before importing EAP6 (before step 4.) - without restarting agent EAP6 was not discovered.

2016-03-10 07:48:44,073 WARN  [InventoryManager.availability-1] (rhq.core.pc.inventory.AvailabilityExecutor)- Availability collection failed with exception on Resource[id=10114, uuid=fd12aea2-d688-4047-a8c9-033518e8eb13, type={JBossAS7}JBossAS7 Standalone Server, key=hostConfig: /home/hudson/jboss-eap7-standalone/standalone/configuration/standalone-full-changed.xml, name=EAP (0.0.0.0:10090), parent=vprusa-jon-eap-03dr02-a1.bc.jonqe.lab.eng.bos.redhat.com, version=EAP 7.0.0.GA], availability will be reported as DOWN, reason=Failed to start component for Resource[id=10114, uuid=fd12aea2-d688-4047-a8c9-033518e8eb13, type={JBossAS7}JBossAS7 Standalone Server, key=hostConfig: /home/hudson/jboss-eap7-standalone/standalone/configuration/standalone-full-changed.xml, name=EAP (0.0.0.0:10090), parent=vprusa-jon-eap-03dr02-a1.bc.jonqe.lab.eng.bos.redhat.com, version=EAP 7.0.0.GA] - The original product type discovered for this server was EAP, but the server is now reporting its product type is [JBoss EAP]
...as expected...