Uploaded image for project: 'Red Hat Fuse'
  1. Red Hat Fuse
  2. ENTESB-7277

Getting java.util.concurrent.CancellationException while stopping bundle in Fuse Fabric

    XMLWordPrintable

Details

    • % %
    • Hide

      Steps to reproduce:
      1. Build the three provided bundles
      2. Create Fabric
      3. Import Profile "test-solution"
      4. container-add-profile root test-solution
      5. In your development environment, increment the version of "essentialCamelRoutesTest" to 1.0.1-SNAPSHOT and modify the profile to refer to this version.
      6. Rebuild all bundles
      7. Import profile again
      8. profile-refresh test-solution (right after the profile import)
      After approx. one minute you should get the first CancellationException, followed by one more every minute, for every bundle that has been loaded by the profile. At the end you get org.osgi.service.blueprint.container.ServiceUnavailableException: Timeout expired when waiting for mandatory OSGi service reference: (objectClass=org.apache.camel.spi.IdempotentRepository) and after this the profile is finally being refreshed correctly. During the wait and timeout the Fuse server seems to partially freeze and cannot even be shut down in a clean way.

      Show
      Steps to reproduce: 1. Build the three provided bundles 2. Create Fabric 3. Import Profile "test-solution" 4. container-add-profile root test-solution 5. In your development environment, increment the version of "essentialCamelRoutesTest" to 1.0.1-SNAPSHOT and modify the profile to refer to this version. 6. Rebuild all bundles 7. Import profile again 8. profile-refresh test-solution (right after the profile import) After approx. one minute you should get the first CancellationException, followed by one more every minute, for every bundle that has been loaded by the profile. At the end you get org.osgi.service.blueprint.container.ServiceUnavailableException: Timeout expired when waiting for mandatory OSGi service reference: (objectClass=org.apache.camel.spi.IdempotentRepository) and after this the profile is finally being refreshed correctly. During the wait and timeout the Fuse server seems to partially freeze and cannot even be shut down in a clean way.

    Description

      When we tried to stop bundles we were getting a cancellationException, concerning an OSGi service with the Interface "org.apache.camel.spi.IdempotentRepository". The container-status remained "installing" and after 5 minutes, the second exception "org.osgi.service.blueprint.container.ServiceUnavailableException" was thrown:

      Error while trying to stop bundle xxxxxx
      Stack Trace:  
      java.util.concurrent.CancellationException
        at java.util.concurrent.FutureTask.report(FutureTask.java:121)[:1.8.0_121]
        at java.util.concurrent.FutureTask.get(FutureTask.java:192)[:1.8.0_121]
        at io.fabric8.agent.service.Deployer.deploy(Deployer.java:905)[io.fabric8:fabric-agent:1.2.0.redhat-630262-04]
        at io.fabric8.agent.service.Agent.provision(Agent.java:366)[io.fabric8:fabric-agent:1.2.0.redhat-630262-04]
        at io.fabric8.agent.service.Agent.provision(Agent.java:199)[io.fabric8:fabric-agent:1.2.0.redhat-630262-04]
        at io.fabric8.agent.DeploymentAgent.doUpdate(DeploymentAgent.java:736)[io.fabric8:fabric-agent:1.2.0.redhat-630262-04]
        at io.fabric8.agent.DeploymentAgent$4.run(DeploymentAgent.java:287)[io.fabric8:fabric-agent:1.2.0.redhat-630262-04]
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)[:1.8.0_121]
        at java.util.concurrent.FutureTask.run(FutureTask.java:266)[:1.8.0_121]
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)[:1.8.0_121]
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)[:1.8.0_121]
        at java.lang.Thread.run(Thread.java:745)[:1.8.0_121]
      ...
      ...
      org.osgi.service.blueprint.container.ServiceUnavailableException: Timeout expired when waiting for mandatory OSGi service reference: (objectClass=org.apache.camel.spi.IdempotentRepository)
            at org.apache.aries.blueprint.container.ReferenceRecipe.getService(ReferenceRecipe.java:234)
            at org.apache.aries.blueprint.container.ReferenceRecipe.access$000(ReferenceRecipe.java:56)      at org.apache.aries.blueprint.container.ReferenceRecipe$ServiceDispatcher.call(ReferenceRecipe.java:306)
            at Proxya35fc301_5573_4542_872c_8ce1cb3495c3.toString(Unknown Source)
            at java.lang.String.valueOf(String.java:2994)[:1.8.0_121]
            at java.lang.StringBuilder.append(StringBuilder.java:131)[:1.8.0_121]
            at org.apache.camel.impl.DefaultCamelContext.shutdownServices(DefaultCamelContext.java:3214)
      ...
      

      For more details, pleas take a look at attached test case.

      Attachments

        Issue Links

          Activity

            People

              ggrzybek Grzegorz Grzybek
              rhn-support-qluo Joe Luo
              Votes:
              0 Vote for this issue
              Watchers:
              8 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: