Bug 1209558 - RtFilter never load vHostMappingFile from absolute or relative path in EAP 6
Summary: RtFilter never load vHostMappingFile from absolute or relative path in EAP 6
Status: CLOSED ERRATA
Alias: None
Product: JBoss Operations Network
Classification: JBoss
Component: Monitoring - CallTime
Version: JON 3.3.1
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: ER01
: JON 3.3.3
Assignee: Michael Burman
QA Contact: Sunil Kondkar
URL:
Whiteboard:
Keywords: Triaged
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-04-07 16:10 UTC by Dasharath Masirkar
Modified: 2016-06-10 22:25 UTC (History)
4 users (show)

(edit)
Clone Of:
(edit)
Last Closed: 2015-07-30 16:41:48 UTC


Attachments (Terms of Use)
standalone.xml (16.12 KB, application/xml)
2015-06-12 11:41 UTC, Sunil Kondkar
no flags Details
vhost-mappings.properties (76 bytes, text/plain)
2015-06-12 11:42 UTC, Sunil Kondkar
no flags Details
helloworld.war (969 bytes, application/zip)
2015-06-12 11:42 UTC, Sunil Kondkar
no flags Details
CalltimeData (79.09 KB, image/png)
2015-07-16 12:46 UTC, Sunil Kondkar
no flags Details


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2015:1525 normal SHIPPED_LIVE Moderate: Red Hat JBoss Operations Network 3.3.3 update 2015-07-30 20:41:08 UTC
Red Hat Bugzilla 1330581 None None None Never

Internal Trackers: 1330581

Comment 1 Dasharath Masirkar 2015-04-07 16:33:11 UTC
Description of problem:
The RtFilter never load vHostMappingFile from absolute or relative path in EAP 6. 

Version-Release number of selected component (if applicable):
3.3.1

How reproducible:
Always

Steps to Reproduce:
1. Install and configure RtFilter in JBoss EAP 6 standalone server as per https://access.redhat.com/documentation/en-US/Red_Hat_JBoss_Operations_Network/3.3/html-single/Users_Guide/index.html#installing-rt-filters

2. Then Add following in web application web.xml :

<filter>
    <filter-name>RhqRtFilter</filter-name>
    <filter-class>org.rhq.helpers.rtfilter.filter.RtFilter</filter-class>
    <init-param>
        <param-name>vHostMappingFile</param-name>
        <param-value>/opt/jboss-eap-6.2/standalone/configuration/vhost-mappings.properties</param-value>
    </init-param> 
</filter>

3. Create /opt/jboss-eap-6.2/standalone/configuration/vhost-mappings.properties file with below configuration :

jon.localhost.com = testvirtualserver
test1.example.com = testvirtualserver

4. Restart the JBoss EAP 6 server to reload the new changes.


Actual results:

The RtFilter never load vHostMappingFile from absolute path /opt/jboss-eap/jboss-eap-6.2/standalone/configuration/ and throw below warning in EAP6 server.log:

22:36:33,806 WARN  [org.rhq.helpers.rtfilter.filter.RtFilter] (ServerService Thread Pool -- 51) Can't read vhost mappings from /opt/jboss-eap/jboss-eap-6.2/standalone/configuration/vhost-mappings.properties

Expected results:
The RtFilter should load vHostMappingFile from absolute path /opt/jboss-eap/jboss-eap-6.2/standalone/configuration/ without throwing any warning.

Additional info:

Comment 2 Dasharath Masirkar 2015-04-07 16:42:37 UTC
(In reply to Dasharath Masirkar from comment #1)
> Description of problem:
> The RtFilter never load vHostMappingFile from absolute or relative path in
> EAP 6. 
> 
> Version-Release number of selected component (if applicable):
> 3.3.1
> 
> How reproducible:
> Always
> 
> Steps to Reproduce:
> 1. Install and configure RtFilter in JBoss EAP 6 standalone server as per
> https://access.redhat.com/documentation/en-US/
> Red_Hat_JBoss_Operations_Network/3.3/html-single/Users_Guide/index.
> html#installing-rt-filters
> 
> 2. Then Add following in web application web.xml :
> 
> <filter>
>     <filter-name>RhqRtFilter</filter-name>
>     <filter-class>org.rhq.helpers.rtfilter.filter.RtFilter</filter-class>
>     <init-param>
>         <param-name>vHostMappingFile</param-name>
>        
> <param-value>/opt/jboss-eap-6.2/standalone/configuration/vhost-mappings.
> properties</param-value>
>     </init-param> 
> </filter>
> 
> 3. Create
> /opt/jboss-eap-6.2/standalone/configuration/vhost-mappings.properties file
> with below configuration :
> 
> jon.localhost.com = testvirtualserver
> test1.example.com = testvirtualserver
> 
> 4. Restart the JBoss EAP 6 server to reload the new changes.
> 
> 
> Actual results:
> 
> The RtFilter never load vHostMappingFile from absolute path
> /opt/jboss-eap/jboss-eap-6.2/standalone/configuration/ and throw below
> warning in EAP6 server.log:
> 
> 22:36:33,806 WARN  [org.rhq.helpers.rtfilter.filter.RtFilter] (ServerService
> Thread Pool -- 51) Can't read vhost mappings from
> /opt/jboss-eap/jboss-eap-6.2/standalone/configuration/vhost-mappings.
> properties
> 
> Expected results:
> The RtFilter should load vHostMappingFile from absolute path
> /opt/jboss-eap/jboss-eap-6.2/standalone/configuration/ without throwing any
> warning.
> 
> Additional info:

Correction :

Actual results:
 
The RtFilter never load vHostMappingFile from absolute path
 /opt/jboss-eap-6.2/standalone/configuration/ and throw below
 warning in EAP6 server.log:
 
22:36:33,806 WARN  [org.rhq.helpers.rtfilter.filter.RtFilter] (ServerService
Thread Pool -- 51) Can't read vhost mappings from
/opt/jboss-eap-6.2/standalone/configuration/vhost-mappings.
properties

Comment 3 Thomas Segismont 2015-04-07 17:03:06 UTC
Micke, would you mind to have a look? Thanks!

Comment 4 Michael Burman 2015-05-25 07:51:24 UTC
The configuration is incorrect, it should NOT be absolute path but instead only the configuration filename that would reside in the configuration/ directory. So in this case:

<param-value>vhost-mappings.properties</param-value>

The documentation could use some work to clarify this.

Comment 5 Sunil Kondkar 2015-06-12 11:38:02 UTC
Tested on 3.3.0.GA Update 03 ( Build Number : 82ad0cc:a25836e )

Installed and configured RtFilter in JBoss EAP 6.2 standalone server by following the steps.

Changed <param-value> to "<param-value>vhost-mappings.properties</param-value>" in web.xml of attached helloworld.war 

Created /opt/jboss-eap-6.2/standalone/configuration/vhost-mappings.properties file and deployed the helloworld.war to EAP6.2.

After restarting the JBoss EAP 6.2 server, the EAP6.2 server.log throws the below warning:

16:19:05,834 WARN  [org.rhq.helpers.rtfilter.filter.RtFilter] (ServerService Thread Pool -- 53) Can't read vhost mappings from vhost-mappings.properties.

Attaching the standalone.xml, helloworld.war and vhost-mappings.properties for reference.

Comment 6 Sunil Kondkar 2015-06-12 11:41:24 UTC
Created attachment 1038026 [details]
standalone.xml

Comment 7 Sunil Kondkar 2015-06-12 11:42:19 UTC
Created attachment 1038028 [details]
vhost-mappings.properties

Comment 8 Sunil Kondkar 2015-06-12 11:42:50 UTC
Created attachment 1038029 [details]
helloworld.war

Comment 9 Michael Burman 2015-06-17 09:49:42 UTC
Right, this feature has never worked in AS7 based applications (including any EAP6) - as the code has been done before the release of AS 5.0. I'm not sure it's even possible to support the documented way of doing things as the EAP6 class loader does not show these files.

Comment 11 Michael Burman 2015-06-18 15:48:47 UTC
Fixed in the master to use jboss.server.config.dir system property (to maintain current documented behaviour):

commit 2e2ddf19d4b782900030654d71a3354847ce7a86
Author: Michael Burman <miburman@redhat.com>
Date:   Thu Jun 18 18:48:03 2015 +0300

    [BZ 1209558] Read RtFilter files from jboss.server.config.dir system property directory

Comment 13 Simeon Pinder 2015-07-10 18:55:41 UTC
Available for test with 3.3.3 ER01 build: 
https://brewweb.devel.redhat.com/buildinfo?buildID=446732
 *Note: jon-server-patch-3.3.0.GA.zip maps to ER01 build of
 jon-server-3.3.0.GA-update-03.zip.

Comment 14 Sunil Kondkar 2015-07-16 12:45:06 UTC
Verified on JBoss ON 3.3.3 ER01 build

Installed and configured RtFilter in JBoss EAP 6.2 standalone server by following the steps.

Created /opt/jboss-eap-6.2/standalone/configuration/vhost-mappings.properties file and deployed the helloworld.war to EAP6.2.

When I had absolute path: <param-value>/opt/jboss-eap-6.2/standalone/configuration/vhost-mappings.properties</param-value>

Restarting the JBoss EAP 6.2 server, the EAP6.2 server.log throws the below warning:

WARN  [org.rhq.helpers.rtfilter.filter.RtFilter] (ServerService Thread Pool -- 50) Can't find vhost mappings file from /opt/jboss-eap-6.2/standalone/configuration/opt/jboss-eap-6.2/standalone/configuration/vhost-mappings.properties

======================
Changed <param-value> to only the configuration filename as below:

<param-value>vhost-mappings.properties</param-value> in web.xml of helloworld.war 

There are no errors in EAP6.2 server.log

Also verified that the call time data is displayed:

Navigated to the webapp->web->Inventory->Connection Settings tab and edited Response Time Log File: /opt/jboss-eap-6.2/standalone/log/rt/helloworld1_rt.log

In Monitoring->Schedules tab enabled and set Response Time metric to 30 seconds

Verified after few minutes that the Monitoring->Calltime displayed the calltime data as attached for reference.

Marking this as verified as there are no errors when <param-value> is set only to the configuration file name.

Comment 15 Sunil Kondkar 2015-07-16 12:46:07 UTC
Created attachment 1052686 [details]
CalltimeData

Comment 17 errata-xmlrpc 2015-07-30 16:41:48 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://rhn.redhat.com/errata/RHSA-2015-1525.html


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