After I inventorize a tomcat 7 [bundled with EWS 2.0.0.CR1] instance and set up remote JMX connection to it, its (HTTP|AJP) connectors appear unavailable. This message appears in the agent's log repeatedly over time: 012-10-11 10:44:27,262 DEBUG [InventoryManager.availability-1] (rhq.core.pc.inventory.AvailabilityExecutor)- Failed to collect availability on Resource[id=10196, uuid=e16d494d-5c81-43fa-9d49-403aef675fc2, type={Tomcat}Tomcat Connector, key=Catalina:port=8009,type=Connector, name=?-8009, parent=Tomcat (8080)] org.rhq.core.pluginapi.inventory.InvalidPluginConfigurationException: Failed to start component for resource Resource[id=10196, uuid=e16d494d-5c81-43fa-9d49-403aef675fc2, type={Tomcat}Tomcat Connector, key=Catalina:port=8009,type=Connector, name=?-8009, parent=Tomcat (8080)]. at org.rhq.core.pc.inventory.InventoryManager.activateResource(InventoryManager.java:1749) at org.rhq.core.pc.inventory.AvailabilityExecutor.checkInventory(AvailabilityExecutor.java:298) at org.rhq.core.pc.inventory.AvailabilityExecutor.checkInventory(AvailabilityExecutor.java:353) at org.rhq.core.pc.inventory.AvailabilityExecutor.checkInventory(AvailabilityExecutor.java:353) at org.rhq.core.pc.inventory.AvailabilityExecutor.call(AvailabilityExecutor.java:149) at org.rhq.core.pc.inventory.AvailabilityExecutor.run(AvailabilityExecutor.java:98) 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$201(ScheduledThreadPoolExecutor.java:165) at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:267) 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:679) Caused by: org.rhq.core.pluginapi.inventory.InvalidPluginConfigurationException: The connector is not listening for requests on the configured port. This is most likely due to the configured port being in use at Tomcat startup. In some cases (AJP connectors) Tomcat will assign an open port. This happens most often when there are multiple Tomcat servers running on the same platform. Check your Tomcat configuration for conflicts: Catalina:port=8009,type=Connector at org.jboss.on.plugins.tomcat.TomcatConnectorComponent.start(TomcatConnectorComponent.java:113) at sun.reflect.GeneratedMethodAccessor34.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:616) at org.rhq.core.pc.inventory.ResourceContainer$ComponentInvocationThread.call(ResourceContainer.java:634) at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334) at java.util.concurrent.FutureTask.run(FutureTask.java:166) ... 3 more .. but the connector is in reality fully working and listening on that port. Also I noticed that JON detects the connector's "handler" attribute as "?" - that is quite likely connected to this issue somehow. The ObjectName of the connector, eg. Catalina:type=Connector,port=8080, is detected correctly. Also, if I for example try to invoke the 'stop' operation on the connector, I get this error in agent's log: 2012-10-11 10:54:40,413 DEBUG [OperationManager.invoker-1] (rhq.core.pc.inventory.ResourceContainer$ResourceComponentInvocationHandler)- Call to [org.jboss.on.plugins.tomcat.TomcatConnectorComponent.invokeOperation()] with args [[stop, Configuration[id=0]]] failed. java.util.concurrent.ExecutionException: java.lang.NullPointerException at java.util.concurrent.FutureTask$Sync.innerGet(FutureTask.java:262) at java.util.concurrent.FutureTask.get(FutureTask.java:119) at org.rhq.core.pc.inventory.ResourceContainer$ResourceComponentInvocationHandler.invokeInNewThreadWithLock(ResourceContainer.java:554) at org.rhq.core.pc.inventory.ResourceContainer$ResourceComponentInvocationHandler.invoke(ResourceContainer.java:542) at $Proxy63.invokeOperation(Unknown Source) at org.rhq.core.pc.operation.OperationInvocation.run(OperationInvocation.java:217) 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:679) Caused by: java.lang.NullPointerException at org.rhq.plugins.jmx.MBeanResourceComponent.loadBean(MBeanResourceComponent.java:175) at org.rhq.plugins.jmx.MBeanResourceComponent.getEmsBean(MBeanResourceComponent.java:137) at org.rhq.plugins.jmx.MBeanResourceComponent.invokeOperation(MBeanResourceComponent.java:524) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:616) at org.rhq.core.pc.inventory.ResourceContainer$ComponentInvocationThread.call(ResourceContainer.java:634) at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334) at java.util.concurrent.FutureTask.run(FutureTask.java:166) ... 3 more
This bug needs a corresponding bug in Jira or Bz (as appropriate) owned by the plugin team. Mark Yarborough work with John Doyle to define EWS owner.
Both work for me now, and were likely caused by bad mbean names. The mbean names got fixed by the Tomcat 7 support patch. If there is a problem, a new bug should be filed using a build that uses the RHQ version that has acked support for Tomcat 7.
Do we have this patch in EWS 2.0.0.GA Jean Frederic ?
or is it bug in JON EWS pluging ?
According to Remy it is working without any patch on EWS side.
OK, Its a bug in EWS/Tomcat plugin, patch exists but it was not included in JON 3.1.2 EWS Plugin. Please keep open this bug and add this patch to next release of JON EWS Plugin.
Confirm if this bug still exists, and if so ensure EWS bug is open to track it (is not a JON bug)....
This bug still exixst and i m not sure if this is bug in EWS tomcat or in JON EWS plugin. Jean Frederic, can you confirm if its a bug in EWS 2.0 Tomcat7 ?
See https://bugzilla.redhat.com/show_bug.cgi?id=707349#c18 the patch wasn't merged in the branch so wasn't fixed :-(
*** Bug 921191 has been marked as a duplicate of this bug. ***
Closing this as it duplicates the already cloned bug that had been captured in EWS. *** This bug has been marked as a duplicate of bug 921194 ***