Bug 642732 - Web Application Context Availability reports DOWN when JBoss Web is started with host name other than localhost
Summary: Web Application Context Availability reports DOWN when JBoss Web is started w...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: RHQ Project
Classification: Other
Component: Plugins
Version: 3.0.0
Hardware: All
OS: All
low
medium
Target Milestone: ---
: ---
Assignee: Stefan Negrea
QA Contact: Mike Foley
URL:
Whiteboard:
Depends On:
Blocks: jon30-bugs
TreeView+ depends on / blocked
 
Reported: 2010-10-13 16:47 UTC by Larry O'Leary
Modified: 2018-11-14 12:47 UTC (History)
2 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2013-09-02 07:14:04 UTC
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker JBPAPP-5260 0 Major Resolved Web Application Context is not registering ComponentType{type=MBean, subtype=WebApplicationManager} in ProfileService wh... 2013-06-24 21:36:37 UTC

Description Larry O'Leary 2010-10-13 16:47:35 UTC
Description of problem:
The Web Application Context of a deployed/inventoried web application shows a state/availability of DOWN. The web application itself shows an availability of UP. This happens when JBoss Web of AS is started with its host name set to the physical host name rather then the default of localhost.

Version-Release number of selected component (if applicable):
JON 2.4.0.GA / jopr-jboss-as-5-plugin-3.0.0.GA.jar

How reproducible:
Always

Steps to Reproduce:
1. Default/stock installation of JON 2.4
2. Default/stock installation of EAP 5.0.1
3. To the EAP installation, modify the host name property in the service.xml of JBoss Web:

JBOSS_HOME=/opt/jboss/eap/jboss-eap-5.0.1/jboss-as
hostName=my.real.hostname.redhat.com
configProfile=default
jbossWebConfig=${JBOSS_HOME}/server/${configProfile}/deploy/jbossweb.sar/server.xml
sed -i 's/<Engine name="jboss.web" defaultHost=".*">/<Engine name="jboss.web" defaultHost="'${hostName}'">/g' "${jbossWebConfig}"
sed -i 's/<Host name=".*">/<Host name="'${hostName}'">/g' "${jbossWebConfig}"

4. Start EAP using the default profile
5. Start JON server and agent
6. Import the EAP instance into JON
7. Navigate to JBossAS Server (JBossAS5 plugin) -> my.real.hostname.redhat.com:1099 default -> Applications -> Web Application (WAR) -> ROOT.war -> Web Application Context -> /my.real.hostname.redhat.com

Actual results:
/my.real.hostname.redhat.com web application context shows an availability of DOWN even though it is UP.

Expected results:
/my.real.hostname.redhat.com web application context should show an availability of UP.

Additional info:
This is not limited to ROOT.war. It appears to impact all web applications. The cause of the DOWN state is because ProfileService returns no managed components of type ComponentType{type=MBean, subtype=WebApplicationManager} when the getComponentsOfType(ComponentType) method is invoked.

This issue appears to be with ProfileService/AS and not actually in the plug-in so an upstream bug will probably need to be filed.

Comment 1 Larry O'Leary 2010-10-13 17:43:26 UTC
Missed this in the description but here is the error you see in the agent log if debug logging is enabled:

Failed to find [ComponentType{type=MBean, subtype=WebApplicationManager}] ManagedComponent named [jboss.web:host=my.real.hostname.redhat.com,path=/,type=Manager]

Comment 2 Larry O'Leary 2010-10-18 18:34:06 UTC
This issue appears to be a problem in ProfileService of EAP/AS. Logged       JBPAPP-5260 in upstream.

Comment 3 Larry O'Leary 2010-10-25 23:00:15 UTC
The missing componentType from ProfileService is due to ${JBOSS_HOME}/server/${JBOSS_CONF}/deploy/profileservice-jboss-beans.xml scoping the Manager bean to a specific host:

    <bean name="WarManagedDeploymentFactory"
        class="org.jboss.profileservice.management.ProxyManagedDeploymentFactory">
        <property name="factoryName">War</property>

        <property name="defaultViewUse">STATISTIC</property>
        <property name="rootMOPatterns">
            <set elementClass="org.jboss.profileservice.management.ProxyDeploymentInfo">
                <!-- Manager -->
                <bean class="org.jboss.profileservice.management.ProxyDeploymentInfo">
                    <property name="compType">MBean</property>
                    <property name="compSubtype">WebApplicationManager</property>
                    <property name="pattern">jboss.web:host=localhost,type=Manager,*</property>
                    <property name="nameBuilder">
                        <inject bean="WarManagerMBeanDeploymentNameBuilder"/>
                    </property>
                </bean>
                <!-- WebModule -->
                <bean class="org.jboss.profileservice.management.ProxyDeploymentInfo">
...

Specifically:

 <property name="pattern">jboss.web:host=localhost,type=Manager,*</property>


Changing this to:

 <property name="pattern">jboss.web:type=Manager,*</property>


Resolves this issue and additionally allows a WebModule deployed to one or more vhosts to appear in ProfileService as well.

Here is a sed command which will fix this:

      JBOSS_HOME=/opt/jboss/eap/jboss-eap-5.1.0/jboss-as
      JBOSS_CONF=default
      sed -i.orig 's/^.*<property name="pattern">jboss\.web:.*,type=Manager,\*<\/property>$/                    <property name="pattern">jboss.web:type=Manager,*<\/property>/g' "${JBOSS_HOME}/server/${JBOSS_CONF}/deploy/profileservice-jboss-beans.xml"

Comment 4 Larry O'Leary 2011-03-07 16:20:17 UTC
The AS fix has been committed upstream on AS 6.0 and also will be included in EAP post 5.1 (i.e. 5.1.1, or > 5.1).

Comment 5 Stefan Negrea 2011-11-11 13:38:23 UTC
I just tested the reported problem with EAP5.1.1 and I cannot replicate it. The issues has been resolved on EAP side. 

This BZ does not require any change in RHQ code. Please retest.

Comment 6 Lukas Krejci 2011-11-25 14:48:58 UTC
Confirmed that this issue seems to have been fixed in EAP 5.1.1. The context is shown as unavailable in EAP 5.1.0 but is correctly shown as UP in EAP 5.1.1 with identical configuration.

Putting this to verified as there are no code changes on our side.

Comment 7 Heiko W. Rupp 2013-09-02 07:14:04 UTC
Bulk closing of issues that were VERIFIED, had no target release and where the status changed more than a year ago.


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