Bug 689833 - [apache] Unable to monitor an apache instance if it listens on more than one port
Summary: [apache] Unable to monitor an apache instance if it listens on more than one ...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: RHQ Project
Classification: Other
Component: Plugins
Version: 4.0.0
Hardware: Unspecified
OS: Unspecified
medium
unspecified
Target Milestone: ---
: ---
Assignee: RHQ Project Maintainer
QA Contact: Corey Welton
URL:
Whiteboard:
Depends On:
Blocks: rhq4
TreeView+ depends on / blocked
 
Reported: 2011-03-22 15:02 UTC by Lukas Krejci
Modified: 2011-10-06 19:50 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed:
Embargoed:


Attachments (Terms of Use)

Description Lukas Krejci 2011-03-22 15:02:10 UTC
Description of problem:

when apache is configured to listen on more than one port (using multiple Listen directives) and has a ServerName directive that contains a port specification which is different from the first Listen port, no metrics are collected because the plugin cannot find the corresponding SNMP entry.

The following appears in the logs:

[ResourceContainer.invoker.daemon-3] (org.rhq.plugins.apache.ApacheVirtualHostServiceComponent)- Unable to match the Virtual Host [localhost:80] with any of the SNMP advertised vhosts: [localhost]. It won't be possible to monitor the Virtual Host


How reproducible:
always

Steps to Reproduce:
1. configure apache as described 
2. inventory it
3. wait for any metrics on the main server resource
  
Actual results:
no metrics collected ever, warning in the agent log

Expected results:
metrics collected, no warnings

Comment 1 Lukas Krejci 2011-03-22 16:17:28 UTC
commit b6e71a4f58ac52de47215a0bd0595d4689b14836
Author: Lukas Krejci <lkrejci>
Date:   Tue Mar 22 17:15:17 2011 +0100

    BZ 689833 - be able to match the main server with snmp index even in the case of multiple listen addresses.

Comment 2 Lukas Krejci 2011-03-22 18:50:55 UTC
commit 81d73ed70f5a5bad8c1741b9116b6f991982a568
Author: Lukas Krejci <lkrejci>
Date:   Tue Mar 22 19:39:44 2011 +0100

    BZ 689833 - restoring the original behavior of getMainServerSampleAddress().

Comment 3 Lukas Krejci 2011-03-24 14:15:54 UTC
commit 771b04e9238e84bb9f269a552b1af837ee33ad85
Author: Lukas Krejci <lkrejci>
Date:   Thu Mar 24 15:13:50 2011 +0100

    BZ 689833 - fixing the discovery regression. The original fix for this bug caused the discovery to be unable to determine the name to use

Comment 4 Sunil Kondkar 2011-04-05 10:41:42 UTC
Verified on build#1123  (Version: 4.0.0-SNAPSHOT Build Number: 08da74a)

Configured to listen on more than one port using multiple Listen directives(Ex: Listen 80   Listen 81) . 
Configured ServerName directive  (Ex: sunillaptop:81) containing a port specification which is different from the first Listen port.

The apache resource is discovered and inventoried in RHQ.

Metrics are collected on the main server resource (Ex: Time to ping the server for availability)

Marking as verified.

Comment 5 Corey Welton 2011-05-24 01:16:28 UTC
Bookkeeping - closing bug - fixed in recent release.

Comment 6 Corey Welton 2011-05-24 01:16:37 UTC
Bookkeeping - closing bug - fixed in recent release.

Comment 7 Corey Welton 2011-05-24 01:16:37 UTC
Bookkeeping - closing bug - fixed in recent release.

Comment 8 Corey Welton 2011-05-24 01:16:43 UTC
Bookkeeping - closing bug - fixed in recent release.


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