Bug 690117 - [apache] Unable to monitor virtual host with address specified as 0.0.0.0[:<port>]
Summary: [apache] Unable to monitor virtual host with address specified as 0.0.0.0[:<p...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: RHQ Project
Classification: Other
Component: Plugins
Version: 4.0.0
Hardware: Unspecified
OS: Unspecified
medium
medium vote
Target Milestone: ---
: ---
Assignee: RHQ Project Maintainer
QA Contact: Mike Foley
URL:
Whiteboard:
Depends On:
Blocks: 919199 jon3
TreeView+ depends on / blocked
 
Reported: 2011-03-23 11:39 UTC by Lukas Krejci
Modified: 2013-09-04 07:16 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-09-04 07:16:05 UTC


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

Description Lukas Krejci 2011-03-23 11:39:49 UTC
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 13:45:38 UTC
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 15:37:09 UTC
see if we can fix or at minimum document the workarounds somewhere

Comment 3 Lukas Krejci 2011-05-19 12:51:45 UTC
This should work in RHQ 4.0.x as a consequence of fixing bug 694476.

Comment 4 Sunil Kondkar 2011-06-29 09:15:38 UTC
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 09:16:43 UTC
Created attachment 510422 [details]
Screenshot

Comment 6 Heiko W. Rupp 2013-09-04 07:16:05 UTC
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.