This service will be undergoing maintenance at 00:00 UTC, 2016-08-01. It is expected to last about 1 hours
Bug 690117 - [apache] Unable to monitor virtual host with address specified as 0.0.0.0[:<port>]
[apache] Unable to monitor virtual host with address specified as 0.0.0.0[:<p...
Status: CLOSED CURRENTRELEASE
Product: RHQ Project
Classification: Other
Component: Plugins (Show other bugs)
4.0.0
Unspecified Unspecified
medium Severity medium (vote)
: ---
: ---
Assigned To: RHQ Project Maintainer
Mike Foley
:
Depends On:
Blocks: 919199 jon3
  Show dependency treegraph
 
Reported: 2011-03-23 07:39 EDT by Lukas Krejci
Modified: 2013-09-04 03:16 EDT (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-09-04 03:16:05 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)
Screenshot (117.20 KB, image/png)
2011-06-29 05:16 EDT, Sunil Kondkar
no flags Details

  None (edit)
Description Lukas Krejci 2011-03-23 07:39:49 EDT
Description of problem:

when the "any address" IP address is specified in the vhost specification in the apache configuration, RHQ is unable to collect metrics on it with a log message like:

(org.rhq.plugins.apache.ApacheVirtualHostServiceComponent)- Unable to match the Virtual Host [0.0.0.0:80] with any of the SNMP advertised vhosts: [localhost, localhost]. It won't be possible to monitor the Virtual Host.
Version-Release number of selected component (if applicable):

Note that we also should detect the IP6 wildcard addresses (i.e. [::] or its "fuller" forms).

How reproducible:
always

Steps to Reproduce:
1. define a virtual host with 0.0.0.0 as its address in apache config
2. restart apache
3. discover the apache instance using RHQ
  
Actual results:
the virtual host "0.0.0.0:80" (or whatever port you've specified) is discovered but no metrics are collected on it and the above mentioned warning message appears in the agent.log

Expected results:
metrics collected, no warning in the logs

Additional info:
Comment 1 Lukas Krejci 2011-03-23 09:45:38 EDT
A workaround for virtual hosts is to replace the "0.0.0.0" with "*" (without quotes), which behaves the same except the fact that "*" allows IPv6 traffic.

For the Listen directive, the workaround is not to specify the IP/hostname at all and just specify the port. This has the same caveat with IPv6 traffic as the vhost workaround.
Comment 2 John Mazzitelli 2011-04-01 11:37:09 EDT
see if we can fix or at minimum document the workarounds somewhere
Comment 3 Lukas Krejci 2011-05-19 08:51:45 EDT
This should work in RHQ 4.0.x as a consequence of fixing bug 694476.
Comment 4 Sunil Kondkar 2011-06-29 05:15:38 EDT
Verified in Version: 4.1.0-SNAPSHOT Build Number: c57ee65

Defined a virtual host 0.0.0.0:8082 in httpd.conf and inventoried Apache. Created a script which wgets the URL http://0.0.0.0:8082. The monitoring tab displays data for the virtual host. Please refer the attached screenshot.

Marking as verified.
Comment 5 Sunil Kondkar 2011-06-29 05:16:43 EDT
Created attachment 510422 [details]
Screenshot
Comment 6 Heiko W. Rupp 2013-09-04 03:16:05 EDT
Fixed in an old RHQ release - closing now

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