Bug 698474 - Apache 2.2 as Windows service: Discovery unable to locate correct httpd.conf
Apache 2.2 as Windows service: Discovery unable to locate correct httpd.conf
Status: CLOSED CURRENTRELEASE
Product: RHQ Project
Classification: Other
Component: Plugins (Show other bugs)
3.0.0
Unspecified Windows
high Severity medium (vote)
: ---
: JON 3.0.0,RHQ 4.3.0
Assigned To: Lukas Krejci
Mike Foley
:
: RHQ-1620 (view as bug list)
Depends On:
Blocks: jon30-bugs jon30-sprint8
  Show dependency treegraph
 
Reported: 2011-04-20 19:36 EDT by Marc Shirley
Modified: 2012-02-07 14:17 EST (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2012-02-07 14:17:20 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)
Screenshot (65.19 KB, image/png)
2011-11-18 09:22 EST, Sunil Kondkar
no flags Details

  None (edit)
Description Marc Shirley 2011-04-20 19:36:22 EDT
Description of problem:
During discovery of httpd.exe, discovery appears to append the HTTPD_ROOT value to the apache installation directory.  For instance, if installing Apache to C:\Apache2.2, discovery will append the default value of HTTPD_ROOT, /apache, and look for the httpd.conf file at C:\Apache2.2\apache\conf\httpd.conf .

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

How reproducible:
Very

Steps to Reproduce:
1. Install Apache 2.2 in non-default directory such as C:\Apache2.2
2. Start Apache 2.2 as Windows service
3. Run discovery on agent
4. Check log for error.
  
Actual results:
Error "Apache configuration file C:\Apache2.2\apache\conf\httpd.conf was not found."

Expected results:
Agent should correctly discover httpd.conf and not write error to logs.

Additional info:
ERROR [ResourceDiscoveryComponent.invoker.daemon-1] (org.rhq.plugins.apache.ApacheServerDiscoveryComponent)- Discovery of Apache process [process: pid=[7788], name=[C:\Apache2.2\bin\httpd.exe], ppid=[696]] failed with an exception.

org.rhq.plugins.apache.parser.ApacheParserException: Apache configuration file C:\Apache2.2\apache\conf\httpd.conf was not found.

	at org.rhq.plugins.apache.parser.ApacheConfigReader.searchFile(ApacheConfigReader.java:26)

	at org.rhq.plugins.apache.parser.ApacheConfigReader.buildTree(ApacheConfigReader.java:19)

	at org.rhq.plugins.apache.ApacheServerDiscoveryComponent.loadParser(ApacheServerDiscoveryComponent.java:423)

	at org.rhq.plugins.apache.ApacheServerDiscoveryComponent.discoverSingleProcess(ApacheServerDiscoveryComponent.java:164)

	at org.rhq.plugins.apache.ApacheServerDiscoveryComponent.discoverResources(ApacheServerDiscoveryComponent.java:89)

	at sun.reflect.GeneratedMethodAccessor73.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:279)

	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:662)
Comment 1 Charles Crouch 2011-04-26 11:18:11 EDT
We should see if this is fixable in the next JON release
Comment 2 Lukas Krejci 2011-11-01 12:14:02 EDT
master: 00872f6afdfcb1347da10559bcd22cb017b68a18
release_jon3.x: 9e46e174f9c47c49cdfdbbcedc0aafbcfe1c56fa

    BZ 698474 - Work around the limitations in PIQL so that we don't try to
    discover the parent NT service httpd process.
Comment 3 Mike Foley 2011-11-16 13:32:14 EST
*** Bug 534866 has been marked as a duplicate of this bug. ***
Comment 4 Sunil Kondkar 2011-11-18 09:14:24 EST
Verified on build#93 (Version: 4.2.0.JON300-SNAPSHOT Build Number: 2619688)

Installed Apache 2.2 in non-default directory (C:\Apache2.2). Started Apache 2.2 as Windows service.

Agent correctly discovered the httpd.conf at "C:\Apache2.2\bin\httpd.exe". Please refer the attached screenshot. There is no apache discovery error in the logs.

Marking as verified.
Comment 5 Sunil Kondkar 2011-11-18 09:22:46 EST
Created attachment 534398 [details]
Screenshot
Comment 6 Mike Foley 2012-02-07 14:17:20 EST
changing status of VERIFIED BZs for JON 2.4.2 and JON 3.0 to CLOSED/CURRENTRELEASE

Note You need to log in before you can comment on or make changes to this bug.