1 2 Previous Next 18 Replies Latest reply on Jul 31, 2012 12:59 PM by sandeep16

    Unable to download maven bundle in amazon cloud

    sandeep16

      a) using fuse fabric latest version

      b) deployed a container in amazon cloud.

      c) Created a new profile.

      d) Deployed new camel route ( bundle) to this new profile using Fuse IDE. When I access profile from fuse IDE, I can see below for bundles:

      mvn:group/camel-blueprint/1.0.0-SNAPSHOT

       

      e) Associate new profile with the cloud container using fuse IDE.

       

      But somehow agent is unable to deploy this new bundle to container.

      Log says:

      Unable to update agent

      MultiException[java.io.IOException: Error downloading mvn:group/camel-blueprint/1.0.0-SNAPSHOT]

              at org.fusesource.fabric.agent.DeploymentAgent.downloadBundles(DeploymentAgent.java:948)[57:org.fusesource.fabric.fabric-agent:7.0.0.fuse-061]

              at org.fusesource.fabric.agent.DeploymentAgent.updateDeployment(DeploymentAgent.java:502)[57:org.fusesource.fabric.fabric-agent:7.0.0.fuse-061]

              at org.fusesource.fabric.agent.DeploymentAgent.doUpdate(DeploymentAgent.java:371)[57:org.fusesource.fabric.fabric-agent:7.0.0.fuse-061]

              at org.fusesource.fabric.agent.DeploymentAgent$1.run(DeploymentAgent.java:204)[57:org.fusesource.fabric.fabric-agent:7.0.0.fuse-061]

              at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)[:1.6.0_31]

              at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)[:1.6.0_31]

              at java.util.concurrent.FutureTask.run(FutureTask.java:138)[:1.6.0_31]

              at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)[:1.6.0_31]

              at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)[:1.6.0_31]

              at java.lang.Thread.run(Thread.java:662)[:1.6.0_31]

       

      I tried to set up FABRIC MAVEN PROXY as below for the profile I'm using ith cloud container but not sure about the path of local repository:

      fabric:profile-edit --pid org.fusesource.fabric.maven/localRepository=\system cloud_camel

       

      My zookeeper server is on different cloud node.

       

      Edited by: sandeep16 on Jul 20, 2012 4:59 PM

        • 1. Re: Unable to download maven bundle in amazon cloud
          stlewis

          Did you initially create the fabric on your local machine and then use that fabric to create a container in EC2?  In this case the container would need to be able to connect back to your local machine on port 8107 to download that artifact.

           

          The way it works is a fabric server runs the fabric maven proxy service.  When containers are created and provisioned they download artifacts via the fabric maven proxy.  So they need to be able to connect back to the OSGi HTTP service port, if you used FMC to create your fabric it'll be on 8107 as FMC configures it differently so as not to conflict with a Fuse ESB instance running on the same host.

          • 2. Re: Unable to download maven bundle in amazon cloud
            sandeep16

            thanks ..I will try it from FMC and let you know...

             

            Sandeep

            • 3. Re: Unable to download maven bundle in amazon cloud
              sandeep16

              okay..after fixing all the issues, and utilizing some workarounds, I was able to deploy bundle in fuse fabric which has just one simple camel route (blueprint.xml attached)

               

              But somehow I am seeing below error when deploying it from fuse IDE:

               

              2012-07-25 17:03:58,183 | ERROR | agent-1-thread-1 | DeploymentAgent                  | 57 - org.fusesource.fabric.fabric-agent - 7.0.0.fuse-061 | Unable to update agent

              java.lang.Exception: Can not resolve feature:

              Unsatisfied requirement(s):

              -


                 package:(&(package=org.apache.camel.osgi))

                    A Camel Blueprint Route

               

                      at org.fusesource.fabric.agent.ObrResolver.resolve(ObrResolver.java:161)[57:org.fusesource.fabric.fabric-agent:7.0.0.fuse-061]

                      at org.fusesource.fabric.agent.DeploymentAgent.updateDeployment(DeploymentAgent.java:504)[57:org.fusesource.fabric.fabric-agent:7.0.0.fuse-061]

                      at org.fusesource.fabric.agent.DeploymentAgent.doUpdate(DeploymentAgent.java:371)[57:org.fusesource.fabric.fabric-agent:7.0.0.fuse-061]

                      at org.fusesource.fabric.agent.DeploymentAgent$1.run(DeploymentAgent.java:204)[57:org.fusesource.fabric.fabric-agent:7.0.0.fuse-061]

                      at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)[:1.6.0_18]

                      at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)[:1.6.0_18]

                      at java.util.concurrent.FutureTask.run(FutureTask.java:166)[:1.6.0_18]

                      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)[:1.6.0_18]

                      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)[:1.6.0_18]

                      at java.lang.Thread.run(Thread.java:636)[:1.6.0_18]

               

              am I missing any package/feature/bundle here?

               

              When I deployed fabric camel example, "fabric-camel-demo-7.0.0.fuse-061", it worked fine ...

              • 4. Re: Unable to download maven bundle in amazon cloud
                stlewis

                Check and see if IDE put it in the profile under the "Bundles" tab or under the "Fuse Application Bundles" tab in FMC.  If it was installed as a bundle then you'd have to make the profile a child of the "camel" profile, which will install the camel-core and camel-blueprint feature.  If it's the latter then the FAB runtime should have installed it for you, maybe make sure the profile created by IDE is a child of the "default" profile as the "default" profile includes the FAB runtime bundle, which turns a normal maven-built Jar into an OSGi bundle and should be installing dependent features automatically.

                • 5. Re: Unable to download maven bundle in amazon cloud
                  sandeep16

                  really appreciate your prompt response.

                  so, I bypassed that error..

                   

                  My camel route has jetty endpoint and routing to activemq queue.

                   

                  I have attached the blue print xml . Now, if I create new profile under camel and deploy this bundle , it has some dependencies it has to wait for like I see in log:

                   

                  able to start blueprint container for bundle camel-blueprint due to unresolved dependencies

                  java.util.concurrent.TimeoutException

                   

                  should I associate new repositories to this profile or we already have existing profile which I inherit from?

                  whats the best approach?

                  • 6. Re: Unable to download maven bundle in amazon cloud
                    stlewis

                    Best practice is to re-use the out of box profiles whenever you can, as they mostly define feature repositories that have consistent versions.  So for example you probably want to inherit from the "camel" profile, think that should have the features repositories your route would depend on, might need "mq" or "mq-base" if you're using activemq-camel.  Strangely enough I'm not seeing the features repo for activemq stuff in my development build so just to be on the safe side you might need to add:

                     

                    mvn:org.apache.activemq/activemq-karaf/5.5.1.fuse-7-060/xml/features

                     

                    to your profile if just adding camel doesn't do the trick

                    • 7. Re: Unable to download maven bundle in amazon cloud
                      sandeep16

                      okay.. I have added repository

                       

                      mvn:org.apache.activemq/activemq-karaf/5.5.1.fuse-7-060/xml/features

                       

                      to my profile...

                       

                      As per logs everything is okay.

                      Now when I try to add my bundle with one caamel route it again complains about dependency

                       

                      undle camel-blueprint is waiting for dependencies [(&(component=activemq)(

                       

                      If you look at my route, it has jetty component as FROM URI and MQ queue as TO URI

                      using fabric addressing scheme..do I have to add anyother dependency?

                       

                       

                      • 8. Re: Unable to download maven bundle in amazon cloud
                        stlewis

                        Did you inherit from the "camel" profile as well?

                        • 9. Re: Unable to download maven bundle in amazon cloud
                          sandeep16

                          I did..

                           

                          Please look at the attached screenshot..

                           

                          maybe I am missing something

                          • 10. Re: Unable to download maven bundle in amazon cloud
                            stlewis

                            Yeah, think you might need to add the "activemq-camel" feature to that profile as well as "camel-jms".  The camel-core and camel-blueprint features are already defined in the camel profile.  If you use camel-jetty in that route as well, then you'll also need to add that.

                            • 11. Re: Unable to download maven bundle in amazon cloud
                              sandeep16

                              okay great..

                              I can just go and execute below command to add activemq-camel to my profile:

                              profile-edit --features activemq-camel cumulus_camel

                               

                              but I think there is more attached to it when you want to assign features to profile.

                               

                              For e.g when I look at camel profile, their features look something like:

                               

                              camel-blueprint/2.9.0.fuse-7-061

                               

                              do I have to pass the complete path or something or my command is good?

                              • 12. Re: Unable to download maven bundle in amazon cloud
                                stlewis

                                Yep, so you don't have to specify the feature version as those profiles do, the provisioning agent can figure that out based on the feature repository.  It's generally better to leave off the version actually, as then you can just change the feature repository version to update all relevant features.

                                 

                                Also, use FMC to make the update, should be easier than profile-edit on the command line

                                • 13. Re: Unable to download maven bundle in amazon cloud
                                  sandeep16

                                  thanks a lot.. I was able to deploy the jetty/mq camel route..

                                  I am trying to call camel jetty endpoint from my local machine but its not working..

                                   

                                   

                                  I have enabled port 8888 on fabric server and trying to call jetty endpoint using fabric server public IP address as below:

                                   

                                  http://<fabricpublicIPadrress:8888>/hellocamel

                                   

                                  my camel route is like this:

                                   

                                   

                                          <log message="Request received : $"/>

                                                

                                  • 14. Re: Unable to download maven bundle in amazon cloud
                                    sandeep16

                                    when I execute zk command, it does say endpoint is deployed but I am not sure why its appearing twice...

                                     

                                    FMC:karaf@FuseManagementConsole> zk:list -r -d fabric/registry/camel

                                    endpoints/cumuluscluster/00000000018 = jetty:http://0.0.0.0:8888/hellocamel

                                    endpoints/cumuluscluster/00000000019 = jetty:http://0.0.0.0:8888/hellocamel

                                    endpoints/cumuluscluster =

                                    endpoints

                                     

                                    still looking to understand how to call this endpoint from external machine which is out of amazon cloud..

                                    1 2 Previous Next