Steps to reproduce: Start Tomcat (7) as non-root user (e.g. 'tomcat'); start RHQ as non-root user. This is for 4.5.1, maybe working on a later version? diff --git a/modules/plugins/tomcat/src/main/java/org/jboss/on/plugins/tomcat/TomcatDiscoveryComponent.java b/modules/plugins/tomc index 542f212..b348fca 100644 --- a/modules/plugins/tomcat/src/main/java/org/jboss/on/plugins/tomcat/TomcatDiscoveryComponent.java +++ b/modules/plugins/tomcat/src/main/java/org/jboss/on/plugins/tomcat/TomcatDiscoveryComponent.java @@ -226,12 +226,6 @@ private DiscoveredResourceDetails parseTomcatProcess(ResourceDiscoveryContext co ProcessInfo processInfo = autoDiscoveryResult.getProcessInfo(); String[] commandLine = processInfo.getCommandLine(); - if (null == processInfo.getExecutable()) { - log.debug("Ignoring Tomcat instance (agent may not be owner) with following command line: " - + Arrays.toString(commandLine)); - return null; - } - if (!isStandalone(commandLine) && !isWindows(context)) { log.debug("Ignoring embedded Tomcat instance (catalina.home not found) with following command line: " + Arrays.toString(commandLine));
Created attachment 763102 [details] Patch for 7e512faae456 Lots of whitespace cleanup, sorry. Tested against Tomcat 7.
putting on the potential list of RHQ 4.10 fixes
Created attachment 824050 [details] Don't skip the discovery process if distinct users run the managed server and the agent. Other middleware plugins (ie AS7) do not prevent such a scenario.
Jean-Frederic, I've assigned the BZ to you so that you can review and merge the patch provided. Please note the original patch is from Elias who deserves the credit (he has already signed the CLA). Thanks, Thomas
merged in master by 003b64a68d29f99c134749e6c9d7db8e8e61837c
Reviewed and merged by Jean-Frederic (see Comment 5)
Bulk closing of 4.10 issues. If an issue is not solved for you, please open a new BZ (or clone the existing one) with a version designator of 4.10.