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

Camel route does not shut down due to ActiveMQ failover transport not finishing

    XMLWordPrintable

Details

    • Bug
    • Resolution: Not a Bug
    • Major
    • None
    • jboss-fuse-6.3
    • ActiveMQ, Camel
    • % %
    • Hide

      Use simple Camel route test case provided and follow these steps:

      • unzip attached test case Camel-JMS-Local-TX.tgz and run mvn install
      • start a fresh Fuse 6.3
      • run the following Fabric commands:
        fabric:create --clean --profile fabric --wait-for-provisioning
        
        # create standard broker container
        container-create-child --profile mq-default root broker
        fabric:wait-for-provisioning
        
        # create profile for Camel test case
        fabric:profile-create --parent mq-client-default test
        fabric:profile-edit --feature activemq-camel test
        fabric:profile-edit --bundle  mvn:org.apache.camel.demo/camel-jms-localtx-demo/1.0 test
        # yes, this deliberately sets the wrong URL in property sourceBrokerUrl
        fabric:profile-edit --pid org.apache.camel.demo.camel_jms_localtx_demo/sourceBrokerUrl="discovery:(fabric:defaultXXX)" test
        
        # create child container that runs the Camel route
        container-create-child --profile test root child
        fabric:wait-for-provisioning
        
      • Wait for the child container to log around one minute after startup:
        WARN  | ActiveMQ Task-1  | FailoverTransport                | 112 - org.apache.activemq.activemq-osgi - 5.11.0.redhat-630347 | Failed to connect to [] after: 10 attempt(s) continuing to retry.
        ERROR | 8.0.1-1-thread-1 | DeploymentAgent                  | 88 - io.fabric8.fabric-agent - 1.2.0.redhat-630347 | Unable to update agent
        io.fabric8.common.util.MultiException: Error restarting bundles
        

        Its important to wait for that message as if you continue before this error, the problem will likely not reproduce.

      • Now correct the broker URL via this Karaf command:
        fabric:profile-edit --pid org.apache.camel.demo.camel_jms_localtx_demo/sourceBrokerUrl="discovery:(fabric:default)" test
      • Observe the child container log output. It logs that it shuts down the Camel route
        INFO  | admin-2-thread-1 | FabricConfigAdminBridge          | 87 - io.fabric8.fabric-configadmin - 1.2.0.redhat-630347 | Updating configuration org.apache.camel.demo.camel_jms_localtx_demo
        INFO  | Thread-57        | BlueprintCamelContext            | 119 - org.apache.camel.camel-core - 2.17.0.redhat-630347 | Apache Camel 2.17.0.redhat-630347 (CamelContext: camel-jms-localtx-demo) is shutting down
        INFO  | Thread-57        | DefaultShutdownStrategy          | 119 - org.apache.camel.camel-core - 2.17.0.redhat-630347 | Starting to graceful shutdown 1 routes (timeout 300 seconds)
        

      ... but this shut down never finishes and the route never restarts.

      • Manually trying an osg:restart <bundle-id-of-camel-route makes the command hang.
      Show
      Use simple Camel route test case provided and follow these steps: unzip attached test case Camel-JMS-Local-TX.tgz and run mvn install start a fresh Fuse 6.3 run the following Fabric commands: fabric:create --clean --profile fabric --wait- for -provisioning # create standard broker container container-create-child --profile mq- default root broker fabric:wait- for -provisioning # create profile for Camel test case fabric:profile-create --parent mq-client- default test fabric:profile-edit --feature activemq-camel test fabric:profile-edit --bundle mvn:org.apache.camel.demo/camel-jms-localtx-demo/1.0 test # yes, this deliberately sets the wrong URL in property sourceBrokerUrl fabric:profile-edit --pid org.apache.camel.demo.camel_jms_localtx_demo/sourceBrokerUrl= "discovery:(fabric:defaultXXX)" test # create child container that runs the Camel route container-create-child --profile test root child fabric:wait- for -provisioning Wait for the child container to log around one minute after startup: WARN | ActiveMQ Task-1 | FailoverTransport | 112 - org.apache.activemq.activemq-osgi - 5.11.0.redhat-630347 | Failed to connect to [] after: 10 attempt(s) continuing to retry. ERROR | 8.0.1-1-thread-1 | DeploymentAgent | 88 - io.fabric8.fabric-agent - 1.2.0.redhat-630347 | Unable to update agent io.fabric8.common.util.MultiException: Error restarting bundles Its important to wait for that message as if you continue before this error, the problem will likely not reproduce. Now correct the broker URL via this Karaf command: fabric:profile-edit --pid org.apache.camel.demo.camel_jms_localtx_demo/sourceBrokerUrl="discovery:(fabric:default)" test Observe the child container log output. It logs that it shuts down the Camel route INFO | admin-2-thread-1 | FabricConfigAdminBridge | 87 - io.fabric8.fabric-configadmin - 1.2.0.redhat-630347 | Updating configuration org.apache.camel.demo.camel_jms_localtx_demo INFO | Thread -57 | BlueprintCamelContext | 119 - org.apache.camel.camel-core - 2.17.0.redhat-630347 | Apache Camel 2.17.0.redhat-630347 (CamelContext: camel-jms-localtx-demo) is shutting down INFO | Thread -57 | DefaultShutdownStrategy | 119 - org.apache.camel.camel-core - 2.17.0.redhat-630347 | Starting to graceful shutdown 1 routes (timeout 300 seconds) ... but this shut down never finishes and the route never restarts. Manually trying an osg:restart <bundle-id-of-camel-route makes the command hang.

    Description

      A Camel route that uses the failover transport to connect to an ActiveMQ broker may fail to shut down if the failover transport gets stuck in reconnecting to the broker.

      Attachments

        Issue Links

          Activity

            People

              ggrzybek Grzegorz Grzybek
              rhn-support-tmielke Torsten Mielke
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: