Description of problem: A setup that used to work with Apache plugin in RHQ 1.3.1 fails to be discovered with an exception: Caused by: org.rhq.plugins.apache.parser.ApacheParserException: Apache configuration file /usr/local/apache2/conf/vhosts.d/*.conf was not found. at org.rhq.plugins.apache.parser.ApacheConfigReader.searchFile(ApacheConfigReader.java:26) at org.rhq.plugins.apache.parser.ApacheParserImpl.addDirective(ApacheParserImpl.java:27) at org.rhq.plugins.apache.parser.ApacheConfigReader.searchFile(ApacheConfigReader.java:50) Steps to Reproduce: 1. 2. 3. Actual results: Apache discovery fails Expected results: Apache gets discovered as it used in 1.3.1 Additional Info: http://community.jboss.org/message/554361
Created attachment 434424 [details] Attachment contains conf files
Ok, I was able to reproduce this. This bug is caused by incorrect handling of absolute paths with a glob pattern. The workaround is to define all the Include directives with relative paths which are going to get resolved under the ServerRoot. In case of the provided configuration files, it should be enough to change Include /usr/local/apache2/conf/vhosts.d/*.conf with Include conf/vhosts.d/*.conf
Created attachment 434433 [details] proposed patch
the above comment should have read "proposed patch" :)
Since this has a workaround I don't think this is a blocker however its something we should get fixed in master asap.
Created attachment 434809 [details] second iteration of the patch Adding a null check for File.listRoots() so that we don't blow up in the presumably rare case when that method would return null.
The patch solves the apache discovery problem. The problem can still occure during loading and updating of configuration. (Augeas functionality) Patch was applied by commit 56081bbf57ddb82a7796ac33f5db80a4ed014d20.
The problem with loading and updating of configuration is described in this issue: https://bugzilla.redhat.com/show_bug.cgi?id=618877 .
QA Verified.
Mass-closure of verified bugs against JON.