JBoss Enterprise Application Platform 4 and 5
  1. JBoss Enterprise Application Platform 4 and 5
  2. JBPAPP-5260

Web Application Context is not registering ComponentType{type=MBean, subtype=WebApplicationManager} in ProfileService when JBossWeb is using host name other than localhost

    Details

    • Type: Bug Bug
    • Status: Resolved Resolved (View Workflow)
    • Priority: Major Major
    • Resolution: Done
    • Affects Version/s: EAP 5.0.0, EWP 5.0.0, EAP 5.0.1, EWP 5.0.1, EAP_EWP 5.1.0, EAP 5.1.0 Post Release, EAP/EWP 5 RHEL-6 RPMs, EAP_EWP 5.1.1, EAP 6.0.0 ER 4
    • Fix Version/s: EAP 5.1.0 Post Release
    • Component/s: Profile Service
    • Security Level: Public (Everyone can see)
    • Labels:
      None
    • Environment:
      Tested using EAP 5.0.0, 5.0.1, 5.1.0, AS 6.0.0 M5, EWP 5.0.1
    • Steps to Reproduce:
      Hide

      1) Install JBoss EAP 5

      2) Enable JMX admin user for default profile:
      JBOSS_HOME=/opt/jboss/eap/jboss-eap-5.1.0/jboss-as
      configProfile=default
      sed -i 's/#*.admin=admin/admin=admin/g' $

      {JBOSS_HOME}/server/${configProfile}/conf/props/jmx-console-users.properties

      3) Change default host name from localhost to physical host name:
      hostName=loleary
      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 default instance:
      cd $

      {JBOSS_HOME}

      /bin
      ./run.sh -c default -b 0.0.0.0

      5) From admin-console (http://localhost:8080/admin-console)
      Expand and select: <hostname> -> JBossAS Servers -> JBoss EAP 5 (default) -> Applications -> Web Application (WAR)s -> ROOT.war -> Web Application Contexts -> //<hostname>/

      • Note the status shows Unavailable (it should be Available)
      Show
      1) Install JBoss EAP 5 2) Enable JMX admin user for default profile: JBOSS_HOME=/opt/jboss/eap/jboss-eap-5.1.0/jboss-as configProfile=default sed -i 's/#*.admin=admin/admin=admin/g' $ {JBOSS_HOME}/server/${configProfile}/conf/props/jmx-console-users.properties 3) Change default host name from localhost to physical host name: hostName=loleary 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 default instance: cd $ {JBOSS_HOME} /bin ./run.sh -c default -b 0.0.0.0 5) From admin-console ( http://localhost:8080/admin-console ) Expand and select: <hostname> -> JBossAS Servers -> JBoss EAP 5 (default) -> Applications -> Web Application (WAR)s -> ROOT.war -> Web Application Contexts -> //<hostname>/ Note the status shows Unavailable (it should be Available)
    • Release Notes Docs Status:
      Not Required
    • Similar Issues:
      Show 8 results 

      Description

      When JBossWeb is using host name (defaultHost) of localhost all seems to work fine. But when JBossWeb is using host name other than localhost, we seem to be missing the component type MBean with a subtype of WebApplicationManager for all deployed WARs within the ProfileService.

      The result is that the Web Application Contexts for the WARs (i.e. ROOT.war) showing a state of DOWN in admin-console when using a host other than localhost. – admin-console – <hostname> -> JBossAS Servers -> JBoss EAP 5 (default) -> Applications -> Web Application (WAR)s -> ROOT.war -> Web Application Contexts -> //<hostname>/

      Output from ProfileServiceDebugServlet for ROOT.war on localhost and on non-localhost is as follows:

      EAP 5.1.0 - jmx-console/ProfileServiceDebugServlet
      Host: localhost
      http://localhost:8080/jmx-console/ProfileServiceDebugServlet

      ROOT.war:
      ManagedDeployment: //localhost/; state: STARTED
      +++ ManagedComponent(name=jboss.web:J2EEApplication=none,J2EEServer=none,j2eeType=WebModule,name=//localhost/, type=(ComponentType

      {type=MBean, subtype=WebApplication}), compName=jboss.web:J2EEApplication=none,J2EEServer=none,j2eeType=WebModule,name=//localhost/, attachment: null
      ++++++ properties: [saveConfig, managedResource, manager, cacheTTL, engineName, startTime, configFile, realm, staticResources, antiJARLocking, stateManageable, compilerClasspath, servlets, valveObjectNames, loader, caseSensitive, processingTime, useNaming, deploymentDescriptor, cacheObjectMaxSize, override, namingContextListener, cachingAllowed, swallowOutput, privileged, parentClassLoader, unloadDelay, docBase, eventProvider, workDir, javaVMs, statisticsProvider, tldScanTime, state, children, modelerType, delegate, mappingObject, startupTime, crossContext, welcomeFiles, logger, path, cookies, reloadable, defaultContextXml, objectName, antiResourceLocking, cacheMaxSize, defaultWebXml, server, allowLinking]
      +++ ManagedComponent(name=jboss.web:J2EEApplication=none,J2EEServer=none,WebModule=//localhost/,j2eeType=Servlet,name=Status Servlet, type=(ComponentType{type=MBean, subtype=Servlet}), compName=jboss.web:J2EEApplication=none,J2EEServer=none,WebModule=//localhost/,j2eeType=Servlet,name=Status Servlet, attachment: null
      ++++++ properties: [minTime, eventProvider, objectName, statisticsProvider, processingTime, engineName, maxTime, errorCount, modelerType, loadTime, stateManageable, classLoadTime, requestCount]
      +++ ManagedComponent(name=jboss.web:J2EEApplication=none,J2EEServer=none,WebModule=//localhost/,j2eeType=Servlet,name=jsp, type=(ComponentType{type=MBean, subtype=Servlet}), compName=jboss.web:J2EEApplication=none,J2EEServer=none,WebModule=//localhost/,j2eeType=Servlet,name=jsp, attachment: null
      ++++++ properties: [minTime, eventProvider, objectName, statisticsProvider, processingTime, engineName, maxTime, errorCount, modelerType, loadTime, stateManageable, classLoadTime, requestCount]
      +++ ManagedComponent(name=jboss.web:J2EEApplication=none,J2EEServer=none,WebModule=//localhost/,j2eeType=Servlet,name=default, type=(ComponentType{type=MBean, subtype=Servlet}), compName=jboss.web:J2EEApplication=none,J2EEServer=none,WebModule=//localhost/,j2eeType=Servlet,name=default, attachment: null
      ++++++ properties: [minTime, eventProvider, objectName, statisticsProvider, processingTime, engineName, maxTime, errorCount, modelerType, loadTime, stateManageable, classLoadTime, requestCount]
      +++ ManagedComponent(name=jboss.web:host=localhost,path=/,type=Manager, type=(ComponentType{type=MBean, subtype=WebApplicationManager}), compName=jboss.web:host=localhost,path=/,type=Manager, attachment: null
      ++++++ properties: [sessionMaxAliveTime, duplicates, maxInactiveInterval, entropy, activeSessions, sessionCounter, sessionAverageAliveTime, processingTime, sessionIdLength, modelerType, processExpiresFrequency, algorithm, maxActive, distributable, maxActiveSessions, randomFile, name, rejectedSessions, expiredSessions, pathname, className]


      EAP 5.1.0 - jmx-console/ProfileServiceDebugServlet
      Host: loleary
      http://localhost:8080/jmx-console/ProfileServiceDebugServlet

      ROOT.war:
      ManagedDeployment: //loleary/; state: STARTED
      +++ ManagedComponent(name=jboss.web:J2EEApplication=none,J2EEServer=none,j2eeType=WebModule,name=//loleary/, type=(ComponentType{type=MBean, subtype=WebApplication}

      ), compName=jboss.web:J2EEApplication=none,J2EEServer=none,j2eeType=WebModule,name=//loleary/, attachment: null
      ++++++ properties: [saveConfig, managedResource, manager, cacheTTL, engineName, startTime, configFile, realm, staticResources, antiJARLocking, stateManageable, compilerClasspath, servlets, valveObjectNames, loader, caseSensitive, processingTime, useNaming, deploymentDescriptor, cacheObjectMaxSize, override, namingContextListener, cachingAllowed, swallowOutput, privileged, parentClassLoader, unloadDelay, docBase, eventProvider, workDir, javaVMs, statisticsProvider, tldScanTime, state, children, modelerType, delegate, mappingObject, startupTime, crossContext, welcomeFiles, logger, path, cookies, reloadable, defaultContextXml, objectName, antiResourceLocking, cacheMaxSize, defaultWebXml, server, allowLinking]
      +++ ManagedComponent(name=jboss.web:J2EEApplication=none,J2EEServer=none,WebModule=//loleary/,j2eeType=Servlet,name=Status Servlet, type=(ComponentType

      {type=MBean, subtype=Servlet}), compName=jboss.web:J2EEApplication=none,J2EEServer=none,WebModule=//loleary/,j2eeType=Servlet,name=Status Servlet, attachment: null
      ++++++ properties: [minTime, eventProvider, objectName, statisticsProvider, processingTime, engineName, maxTime, errorCount, modelerType, loadTime, stateManageable, classLoadTime, requestCount]
      +++ ManagedComponent(name=jboss.web:J2EEApplication=none,J2EEServer=none,WebModule=//loleary/,j2eeType=Servlet,name=jsp, type=(ComponentType{type=MBean, subtype=Servlet}

      ), compName=jboss.web:J2EEApplication=none,J2EEServer=none,WebModule=//loleary/,j2eeType=Servlet,name=jsp, attachment: null
      ++++++ properties: [minTime, eventProvider, objectName, statisticsProvider, processingTime, engineName, maxTime, errorCount, modelerType, loadTime, stateManageable, classLoadTime, requestCount]
      +++ ManagedComponent(name=jboss.web:J2EEApplication=none,J2EEServer=none,WebModule=//loleary/,j2eeType=Servlet,name=default, type=(ComponentType

      {type=MBean, subtype=Servlet}

      ), compName=jboss.web:J2EEApplication=none,J2EEServer=none,WebModule=//loleary/,j2eeType=Servlet,name=default, attachment: null
      ++++++ properties: [minTime, eventProvider, objectName, statisticsProvider, processingTime, engineName, maxTime, errorCount, modelerType, loadTime, stateManageable, classLoadTime, requestCount]

      When accessing the Web Application Contexts for ROOT.war from admin-console the following error is captured in server.log:

      ERROR [MeasurementManager] Could not get measurement values
      java.lang.IllegalStateException: Failed to find [ComponentType

      {type=MBean, subtype=WebApplicationManager}

      ] ManagedComponent named [jboss.web:host=loleary,path=/,type=Manager].
      at org.rhq.plugins.jbossas5.ManagedComponentComponent.getManagedComponent(ManagedComponentComponent.java:365)
      at org.rhq.plugins.jbossas5.ManagedComponentComponent.getValues(ManagedComponentComponent.java:227)
      at org.rhq.plugins.jbossas5.WebApplicationContextComponent.getValues(WebApplicationContextComponent.java:156)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:616)
      at org.rhq.core.pc.inventory.ResourceContainer$ComponentInvocationThread.call(ResourceContainer.java:525)
      at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
      at java.util.concurrent.FutureTask.run(FutureTask.java:166)
      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
      at java.lang.Thread.run(Thread.java:636)

        Issue Links

          Activity

          Hide
          Emanuel Muckenhuber
          added a comment -

          actually i committed the fix a while ago, so resolving this issue.

          Show
          Emanuel Muckenhuber
          added a comment - actually i committed the fix a while ago, so resolving this issue.
          Hide
          RH Bugzilla Integration
          added a comment -

          Stefan Negrea <snegrea@redhat.com> changed the Status of bug 642732 from NEW to ON_DEV

          Show
          RH Bugzilla Integration
          added a comment - Stefan Negrea <snegrea@redhat.com> changed the Status of bug 642732 from NEW to ON_DEV
          Hide
          RH Bugzilla Integration
          added a comment -

          Stefan Negrea <snegrea@redhat.com> made a comment on bug 642732

          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.

          Show
          RH Bugzilla Integration
          added a comment - Stefan Negrea <snegrea@redhat.com> made a comment on bug 642732 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.
          Hide
          RH Bugzilla Integration
          added a comment -

          Stefan Negrea <snegrea@redhat.com> changed the Status of bug 642732 from ON_DEV to ON_QA

          Show
          RH Bugzilla Integration
          added a comment - Stefan Negrea <snegrea@redhat.com> changed the Status of bug 642732 from ON_DEV to ON_QA
          Hide
          RH Bugzilla Integration
          added a comment -

          Lukas Krejci <lkrejci@redhat.com> changed the Status of bug 642732 from ON_QA to VERIFIED

          Show
          RH Bugzilla Integration
          added a comment - Lukas Krejci <lkrejci@redhat.com> changed the Status of bug 642732 from ON_QA to VERIFIED
          Hide
          RH Bugzilla Integration
          added a comment -

          Lukas Krejci <lkrejci@redhat.com> made a comment on bug 642732

          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.

          Show
          RH Bugzilla Integration
          added a comment - Lukas Krejci <lkrejci@redhat.com> made a comment on bug 642732 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.
          Hide
          RH Bugzilla Integration
          added a comment -

          Heiko W. Rupp <hrupp@redhat.com> changed the Status of bug 642732 from VERIFIED to CLOSED

          Show
          RH Bugzilla Integration
          added a comment - Heiko W. Rupp <hrupp@redhat.com> changed the Status of bug 642732 from VERIFIED to CLOSED
          Hide
          RH Bugzilla Integration
          added a comment -

          Heiko W. Rupp <hrupp@redhat.com> made a comment on bug 642732

          Bulk closing of issues that were VERIFIED, had no target release and where the status changed more than a year ago.

          Show
          RH Bugzilla Integration
          added a comment - Heiko W. Rupp <hrupp@redhat.com> made a comment on bug 642732 Bulk closing of issues that were VERIFIED, had no target release and where the status changed more than a year ago.

            People

            • Assignee:
              Emanuel Muckenhuber
              Reporter:
              Larry O'Leary
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: