Bug 822861

Summary: Tomcat 5 Connectors are not discovered at all
Product: [JBoss] JBoss Operations Network Reporter: bkramer <bkramer>
Component: Plugin -- TomcatAssignee: John Mazzitelli <mazz>
Status: CLOSED CURRENTRELEASE QA Contact: Mike Foley <mfoley>
Severity: urgent Docs Contact:
Priority: urgent    
Version: JON 3.1.0CC: jclere, loleary, mazz, skondkar, spinder
Target Milestone: ---   
Target Release: JON 3.1.0   
Hardware: All   
OS: All   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-09-11 11:03:59 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:
Embargoed:
Bug Depends On:    
Bug Blocks: 782579    
Attachments:
Description Flags
No Tomcat Connectors in JON 310
none
Tomcat 5 Connectors in JON 3.0
none
Screenshot_Tomcat-Connectors none

Description bkramer 2012-05-18 10:43:08 UTC
Created attachment 585383 [details]
No Tomcat Connectors in JON 310

Description of problem:
Installed EWS 1.0.2 and started tomcat 5. When using clean installation of JON 3.1.0 (installation zip file is downloaded from http://download.devel.redhat.com/brewroot/packages/org.jboss.on-jboss-on-parent/3.1.0.GA/6/maven/org/jboss/on/jon-server/3.1.0.GA/jon-server-3.1.0.GA.zip), this server is properly discovered and added into inventory. However it's connectors are not discovered at all. 

I repeated the same with JON 3.0 and Tomcat 5 Connectors were properly discovered.

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

JON 3.1.0

How reproducible:
Always

Steps to Reproduce:
1. Clean install of JON 3.1.0 and JON Agent 3.1.0
2. Install and configure EWS 1.0.2
3. Run Tomcat 5 (using default server.xml file)
  
Actual results:
No Tomcat Connectors are discovered.

Expected results:
Tomcat Connectors are properly discovered.


Additional info: 

The following exception is logged in the agent.log file:
*******************************************************
2012-05-18 11:35:37,008 DEBUG [InventoryManager.discovery-1] (rhq.core.pc.inventory.RuntimeDiscoveryExecutor)- Running service scan on parent resource [Resource[id=10005, uuid=636def92-b6e3-4175-90c0-1c923c234f25, type={Tomcat}Tomcat Server, key=/home/biljana/EWS/jboss-ews-1.0/tomcat5, name=Tomcat (8080), parent=10.33.1.120, version=5.5.33.0]] looking for children of type [{Tomcat}Tomcat Connector]
2012-05-18 11:35:37,008 DEBUG [InventoryManager.discovery-1] (rhq.core.pc.inventory.InventoryManager)- Executing discovery for [Tomcat Connector] Resources...
2012-05-18 11:35:37,022 DEBUG [InventoryManager.discovery-1] (rhq.core.pc.util.DiscoveryComponentProxyFactory)- Call to [org.jboss.on.plugins.tomcat.TomcatConnectorDiscoveryComponent.discoverResources()] with args [[org.rhq.core.pluginapi.inventory.ResourceDiscoveryContext@4e0b495e]] failed.
java.util.concurrent.ExecutionException: java.lang.Exception: Discovery component invocation failed.
	at java.util.concurrent.FutureTask$Sync.innerGet(FutureTask.java:232)
	at java.util.concurrent.FutureTask.get(FutureTask.java:91)
	at org.rhq.core.pc.util.DiscoveryComponentProxyFactory$ResourceDiscoveryComponentInvocationHandler.invokeInNewThread(DiscoveryComponentProxyFactory.java:221)
	at org.rhq.core.pc.util.DiscoveryComponentProxyFactory$ResourceDiscoveryComponentInvocationHandler.invoke(DiscoveryComponentProxyFactory.java:208)
	at $Proxy50.discoverResources(Unknown Source)
	at org.rhq.core.pc.inventory.InventoryManager.invokeDiscoveryComponent(InventoryManager.java:324)
	at org.rhq.core.pc.inventory.InventoryManager.executeComponentDiscovery(InventoryManager.java:2433)
	at org.rhq.core.pc.inventory.RuntimeDiscoveryExecutor.discoverForResource(RuntimeDiscoveryExecutor.java:260)
	at org.rhq.core.pc.inventory.RuntimeDiscoveryExecutor.discoverForResourceRecursive(RuntimeDiscoveryExecutor.java:156)
	at org.rhq.core.pc.inventory.RuntimeDiscoveryExecutor.runtimeDiscover(RuntimeDiscoveryExecutor.java:141)
	at org.rhq.core.pc.inventory.RuntimeDiscoveryExecutor.call(RuntimeDiscoveryExecutor.java:100)
	at org.rhq.core.pc.inventory.RuntimeDiscoveryExecutor.call(RuntimeDiscoveryExecutor.java:56)
	at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
	at java.util.concurrent.FutureTask.run(FutureTask.java:138)
	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:98)
	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:207)
	at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
	at java.lang.Thread.run(Thread.java:619)
Caused by: java.lang.Exception: Discovery component invocation failed.
	at org.rhq.core.pc.util.DiscoveryComponentProxyFactory$ComponentInvocationThread.call(DiscoveryComponentProxyFactory.java:297)
	at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
	at java.util.concurrent.FutureTask.run(FutureTask.java:138)
	... 3 more
Caused by: java.lang.NullPointerException
	at org.jboss.on.plugins.tomcat.TomcatConnectorDiscoveryComponent.discoverResources(TomcatConnectorDiscoveryComponent.java:126)
	at sun.reflect.GeneratedMethodAccessor38.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:597)
	at org.rhq.core.pc.util.DiscoveryComponentProxyFactory$ComponentInvocationThread.call(DiscoveryComponentProxyFactory.java:293)
	... 5 more
2012-05-18 11:35:37,027 WARN  [InventoryManager.discovery-1] (rhq.core.pc.inventory.InventoryManager)- Failure during discovery for [Tomcat Connector] Resources - failed after 19 ms.
java.lang.Exception: Discovery component invocation failed.
	at org.rhq.core.pc.util.DiscoveryComponentProxyFactory$ComponentInvocationThread.call(DiscoveryComponentProxyFactory.java:297)
	at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
	at java.util.concurrent.FutureTask.run(FutureTask.java:138)
	at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
	at java.lang.Thread.run(Thread.java:619)
Caused by: java.lang.NullPointerException
	at org.jboss.on.plugins.tomcat.TomcatConnectorDiscoveryComponent.discoverResources(TomcatConnectorDiscoveryComponent.java:126)
	at sun.reflect.GeneratedMethodAccessor38.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:597)
	at org.rhq.core.pc.util.DiscoveryComponentProxyFactory$ComponentInvocationThread.call(DiscoveryComponentProxyFactory.java:293)
	... 5 more

Comment 1 bkramer 2012-05-18 10:44:10 UTC
Created attachment 585386 [details]
Tomcat 5 Connectors in JON 3.0

Comment 2 Larry O'Leary 2012-05-18 14:42:15 UTC
This is a regression so I am setting the severity/priority appropriately.

Comment 3 John Mazzitelli 2012-05-21 15:24:00 UTC
looks like this was a regression due to the fix for bug 795531

Comment 4 John Mazzitelli 2012-05-21 19:02:22 UTC
looks like older Tomcat versions (like Tomcat 5) do not even have the "executorName" MBean attribute. Need to make sure our code accounts for this.

git commit to master: 8b1a1ee

Comment 5 John Mazzitelli 2012-05-22 13:42:26 UTC
this is to be targeted to jon 3.1, so I committed this to release/jon3.1.x branch: 0155fb1

Comment 6 Sunil Kondkar 2012-06-07 10:23:21 UTC
Verified on Version: 3.1.0.CR3 Build Number: 1ceb7bf:74870eb

Installed EWS 1.0.2 and started Tomcat 5. Tomcat Connectors are discovered. Please refer the attached screenshot.

Comment 7 Sunil Kondkar 2012-06-07 10:24:13 UTC
Created attachment 590150 [details]
Screenshot_Tomcat-Connectors