Description of problem: Tomcat servers not discovered on Windows when installed as a service Version-Release number of selected component (if applicable): 4.9 How reproducible: Always Steps to Reproduce: 1. Install Tomcat7 with the Windows installer 2. Start a detailed discovery operation on the platform resource Actual results: The Tomcat server is not discovered and a NPE is printed in the agent log: 2013-11-27 13:28:02,480 ERROR [ResourceDiscoveryComponent.invoker.daemon-2] (jboss.on.plugins.tomcat.TomcatDiscoveryComponent)- Error creating discovered resource for process: ProcessScanResult: scan=[ProcessScan: query=[process|basename|match=^(T|t)omcat(5|6|7)\.exe], name=[WindowsEWSTomcat]], info=[process: pid=[3480], name=[C:\Program Files\Apache Software Foundation\Tomcat 7.0\bin\Tomcat7.exe], ppid=[500]] java.lang.NullPointerException at org.jboss.on.plugins.tomcat.TomcatDiscoveryComponent.determineCatalinaHomeOnWindows(TomcatDiscoveryComponent.java:386) at org.jboss.on.plugins.tomcat.TomcatDiscoveryComponent.parseTomcatProcess(TomcatDiscoveryComponent.java:251) at org.jboss.on.plugins.tomcat.TomcatDiscoveryComponent.discoverResources(TomcatDiscoveryComponent.java:126) at sun.reflect.GeneratedMethodAccessor35.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at org.rhq.core.pc.util.DiscoveryComponentProxyFactory$ComponentInvocationThread.call(DiscoveryComponentProxyFactory.java:306) at java.util.concurrent.FutureTask.run(Unknown Source) at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) at java.lang.Thread.run(Unknown Source) Expected results: Tomcat server is discovered and no NPE in the agent log Additional info: On Windows, TomcatDiscoveryComponent only supports EWS servers installed as services.
I have a fix for this one and will attach the patch
Created attachment 829784 [details] Only EWS services were supported
Comment on attachment 829784 [details] Only EWS services were supported In fact the patch fixes both 971615 and 1035348
Sorry, I don't get it. Why do you say it also fixes BZ971615?
because it doesn't apply on master now :-(
but no problem I have arranged it... Trying to test now...
+++ 2013-11-28 17:09:07,980 DEBUG [RHQ Agent Prompt Input Thread] (org.rhq.core.system.ProcessInfo)- Unexpected error occurred while looking up info for [<unknown>] process with pid [1172] - call to getProcArgs failed. Did the process die? Cause: org.hyperic.sigar.SigarException: Incorrect function.^M +++ Does the sigar dll supports windows7-64-SP1?
(In reply to Jean-frederic Clere from comment #7) > +++ > 2013-11-28 17:09:07,980 DEBUG [RHQ Agent Prompt Input Thread] > (org.rhq.core.system.ProcessInfo)- Unexpected error occurred while looking > up info for [<unknown>] process with pid [1172] - call to getProcArgs > failed. Did the process die? Cause: org.hyperic.sigar.SigarException: > Incorrect function.^M > +++ > > Does the sigar dll supports windows7-64-SP1? It should. Jay is on Win7. It may happen if the user running the agent does not have appropriate permission (that's why this is logged at debug level)
Should be fixed by: commit 76756fb6f531f24c518f246130e2eafe397f9428 Author: Jean-Frederic Clere <jfclere> Date: Sun Mar 9 10:07:09 2014 +0100
Bulk closing of RHQ 4.11 issues, now that RHQ 4.12 is out. If you find an issue with those, please open a new BZ, linking to the old one.