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.
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]
This issue appears to be a problem in ProfileService of EAP/AS. Logged JBPAPP-5260 in upstream.
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"
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).
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.
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.
Bulk closing of issues that were VERIFIED, had no target release and where the status changed more than a year ago.