6 Replies Latest reply on Dec 1, 2009 5:29 AM by Heiko Rupp

    time out when try

    Rafael Soares (Tuelho) Novice

      Always I tried use the "Create New" operation to redeploy a WAR via JON the operation fails and I receive this error:

      "Close Window

      org.rhq.core.pc.inventory.TimeoutException: Call to [org.rhq.plugins.jbossas.JBossASServerComponent.createResource()] with args [[CreateResourceReport: ResourceType=[ResourceType[id=0, category=Service, name=Web Application (WAR), plugin=JBossAS]], ResourceKey=[null]]] timed out. Invocation thread will be interrupted
      at org.rhq.core.pc.inventory.ResourceContainer$ResourceComponentInvocationHandler.invokeInNewThreadWithLock(ResourceContainer.java:465)
      at org.rhq.core.pc.inventory.ResourceContainer$ResourceComponentInvocationHandler.invoke(ResourceContainer.java:434)
      at $Proxy59.createResource(Unknown Source)
      at org.rhq.core.pc.inventory.CreateResourceRunner.call(CreateResourceRunner.java:113)
      at org.rhq.core.pc.inventory.CreateResourceRunner.run(CreateResourceRunner.java:94)
      at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
      at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
      at java.util.concurrent.FutureTask.run(FutureTask.java:138)
      at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
      at java.lang.Thread.run(Thread.java:619)"

      Agent-Server Clock Difference: 3.441ms

      Where can I configure the timeout for this operation?

      My Env:

      OS: RHEL 5
      JBoss 4.2.0.GA EAP CP01
      java version "1.6.0_13"
      Java(TM) SE Runtime Environment (build 1.6.0_13-b03)
      Java HotSpot(TM) 64-Bit Server VM (build 11.3-b02, mixed mode)
      JON 2.3

        • 1. Re: time out when try
          Ian Springer Master

          The timeout for resource creation is 60 seconds and is not configurable.

          However, to update/redeploy and EAR or WAR, you should not use Create New; Create New should only be used for the initial deploy of an EAR or WAR. For redeploys, you should instead go to the EAR or WAR's Content tab and update the underlying EAR or WAR file there. If you still get an error doing it that way, post the relevant lines from your Agent log, and I'll try to help.

          • 2. Re: time out when try
            mazz Master

            I hate it when something is not configurable :-)

            • 3. Re: time out when try
              Rafael Soares (Tuelho) Novice

              Hello Ips.

              I tried to use the "resource WAR > content tab > "NEW" subtab" option but JBAS throw the following exception during redeploy:

              Caused by: javax.management.InstanceAlreadyExistsException: jboss.web.deployment:war=censo2008.war,id=692747587 already registered.
               at org.jboss.mx.server.registry.BasicMBeanRegistry.add(BasicMBeanRegistry.java:761)
               at org.jboss.mx.server.registry.BasicMBeanRegistry.registerMBean(BasicMBeanRegistry.java:225)
               at sun.reflect.GeneratedMethodAccessor1.invoke(Unknown Source)
               at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
               at java.lang.reflect.Method.invoke(Method.java:597)
               at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
               at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
               at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
               at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
               at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
               at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
               at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
               at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
               at org.jboss.mx.server.MBeanServerImpl$3.run(MBeanServerImpl.java:1422)
               at java.security.AccessController.doPrivileged(Native Method)
               at org.jboss.mx.server.MBeanServerImpl.registerMBean(MBeanServerImpl.java:1417)
               at org.jboss.mx.server.MBeanServerImpl.registerMBean(MBeanServerImpl.java:376)
               at org.jboss.web.AbstractWebContainer.create(AbstractWebContainer.java:443)
               ... 36 more


              this exception alwas occur when I do this via "Create New" WAR/EAR. About this exception I found refs [1], [2] and [3].

              I think (IMHO) there should be a way (more intuitive) to redeploy (hotdeploy) packges (WAR/JAR/SAR/EAR) inside JBoss instances via JON/Jopr operation.

              [1] https://jira.jboss.org/jira/browse/JBAS-1262
              [2] https://jira.jboss.org/jira/browse/EMBJOPR-107
              [3] http://www.jboss.org/index.html?module=bb&op=viewtopic&t=53623

              • 4. Re: time out when try
                Rafael Soares (Tuelho) Novice

                complementing...

                this operation (via "content tab") could be able to make a backup of old package like on "Create New" operation.

                If the "Create New" operation must be used only for initial deployments, why it has the backup option?

                regards

                • 5. Re: time out when try
                  Ian Springer Master

                   

                  this operation (via "content tab") could be able to make a backup of old package like on "Create New" operation.


                  Agreed, that would make it more consistent.

                  If the "Create New" operation must be used only for initial deployments, why it has the backup option?


                  Good question. I agree the backup option really only makes sense for updates/redeploys. IMO, the create should fail with a "WAR already exists" error if a WAR with given name is already deployed, which is how it works in the jboss-as-5 plugin.


                  • 6. Re: time out when try
                    Heiko Rupp Master

                    I implemented the backup option for WAR/EAR deploy, as the update through content tab is not "obvious" - we did have many users asking for backup possibility.
                    This backup feature is probably not the "clean way" and may go away in the future when the content subsystem has been revamped (and I understand that there are people working in that area).