JBoss ON agent fails to discover Apache Web Server resource when httpd.conf Include directive contains a lowercase drive letter or a forward-slash (/) due to IllegalArgumentException: Path '' does not exist

Solution Unverified - Updated -

Issue

  • Auto-discover Apache
  • My apache instances don't seem to be auto-discovering
  • Agent log contains the following error:

    ERROR [ResourceDiscoveryComponent.invoker.daemon-1] (org.rhq.plugins.apache.ApacheServerDiscoveryComponent)- Discovery of Apache process [process: pid=[4218], name=[C:\Program Files\Apache Software Foundation\Apache2.2\httpd.exe], ppid=[1002]] failed with an exception.
    org.rhq.plugins.apache.parser.ApacheParserException: java.lang.IllegalArgumentException: Path '' does not exist.
        at org.rhq.plugins.apache.parser.ApacheConfigReader.searchFile(ApacheConfigReader.java:60)
        at org.rhq.plugins.apache.parser.ApacheConfigReader.buildTree(ApacheConfigReader.java:19)
        at org.rhq.plugins.apache.ApacheServerDiscoveryComponent.parseRuntimeConfiguration(ApacheServerDiscoveryComponent.java:669)
        at org.rhq.plugins.apache.ApacheServerDiscoveryComponent.parseRuntimeConfiguration(ApacheServerDiscoveryComponent.java:656)
        at org.rhq.plugins.apache.ApacheServerDiscoveryComponent.discoverSingleProcess(ApacheServerDiscoveryComponent.java:326)
        at org.rhq.plugins.apache.ApacheServerDiscoveryComponent.discoverResources(ApacheServerDiscoveryComponent.java:249)
        ...
    Caused by: java.lang.IllegalArgumentException: Path '' does not exist.
        at org.rhq.augeas.util.Glob.match(Glob.java:119)
        at org.rhq.plugins.apache.parser.ApacheParserImpl.getIncludeFiles(ApacheParserImpl.java:134)
        at org.rhq.plugins.apache.parser.ApacheParserImpl.addDirective(ApacheParserImpl.java:64)
        at org.rhq.plugins.apache.parser.ApacheConfigReader.searchFile(ApacheConfigReader.java:48)
        ... 14 more
    

Environment

  • JBoss Operations Network (ON) 3.1, 3.1.1, 3.1.2
  • Apache HTTP Server plug-in for JBoss ON
  • Apache web server (httpd) running with one or more configuration files that contain an Include directive:
    • with a file path which begins with a lowercase drive letter such as c: instead of C:
    • or with a file path which contains a a forward-slash (/) as a file separator
  • Agent and Apache web server are running on a Microsoft Windows platform

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content