Forum Home » Enterprise Products » Fuse ESB Enterprise

Thread: [Fabric] can't create remote container

 
This question is answered. Helpful answers available: 1. Correct answers available: 1.


Permlink Replies: 7 - Last Post: May 24, 2012 11:06 AM Last Post By: iocanel Threads: [ Previous | Next ]
patg

Posts: 20
Registered: 09/01/10
[Fabric] can't create remote container
Posted: May 24, 2012 7:59 AM
 
  Click to reply to this thread Reply
Hi,
I have 2 linux VMs (Debian based) behind an authenticating http proxy.
I declared my proxy in both /etc/profile and ~/.bashrc and curl is using it OK.
I also modified $FUSE_HOME/etc/org.ops4j.pax.url.mvn.cfg to activate the proxy support and pointed to my maven settings.xml

When I try to create a remote container on machine B, from machine A with the following command:

fabric:container-create-ssh --host 192.168.102.190 --path /home/adminuser/fuse --user adminuser --password adminuser --profile mq remoteBroker1

The remote folders are created but it fails when trying to download the artifacts with the following log.
I have this behavior if Machine A is a Linux or Windows box.
From the log I see it first try to download the artifacts from what looks like a fuse-local repo: http://salineos:8181/maven/download/ but I can't find anything at this URL.

I tried to run curl with the urls listed in the log and it works as expected.

      • output
Running: mkdir -p /home/adminuser/containers/
Running: cd /home/adminuser/containers/
Running: mkdir -p remoteBroker1
Running: cd remoteBroker1
Java version is greater than 1.6.
Downloading Maven Artifact with groupId: org.fusesource.fabric artifactId: fuse-fabric and version: 7.0.0.fuse-061 from repository: http://salineos:8181/maven/download/
Using URL: http://salineos:8181/maven/download/org/fusesource/fabric/fuse-fabric/7.0.0.fuse-061/fuse-fabric-7.0.0.fuse-061.tar.gz
Download failed with code: 404
rm: impossible de supprimer « fuse-fabric-7.0.0.fuse-061.tar.gz »: Aucun fichier ou dossier de ce type
Downloading Maven Artifact with groupId: org.fusesource.fabric artifactId: fuse-fabric and version: 7.0.0.fuse-061 from repository: http://repo.fusesource.com/nexus/content/groups/public/
Using URL: http://repo.fusesource.com/nexus/content/groups/public/org/fusesource/fabric/fuse-fabric/7.0.0.fuse-061/fuse-fabric-7.0.0.fuse-061.tar.gz
Download failed with code: 000
rm: impossible de supprimer « fuse-fabric-7.0.0.fuse-061.tar.gz »: Aucun fichier ou dossier de ce type
Downloading Maven Artifact with groupId: org.fusesource.fabric artifactId: fuse-fabric and version: 7.0.0.fuse-061 from repository: http://repo.fusesource.com/nexus/content/groups/ea/
Using URL: http://repo.fusesource.com/nexus/content/groups/ea/org/fusesource/fabric/fuse-fabric/7.0.0.fuse-061/fuse-fabric-7.0.0.fuse-061.tar.gz
Download failed with code: 000
rm: impossible de supprimer « fuse-fabric-7.0.0.fuse-061.tar.gz »: Aucun fichier ou dossier de ce type
Downloading Maven Artifact with groupId: org.fusesource.fabric artifactId: fuse-fabric and version: 7.0.0.fuse-061 from repository: http://repo.fusesource.com/nexus/content/repositories/snapshots/
Using URL: http://repo.fusesource.com/nexus/content/repositories/snapshots/org/fusesource/fabric/fuse-fabric/7.0.0.fuse-061/fuse-fabric-7.0.0.fuse-061.tar.gz
Download failed with code: 000
rm: impossible de supprimer « fuse-fabric-7.0.0.fuse-061.tar.gz »: Aucun fichier ou dossier de ce type
Command Failed:Could not find file fuse-fabric-7.0.0.fuse-061.tar.gz

      • error ---


ffang

Posts: 1,320
Registered: 12/24/07
Re: [Fabric] can't create remote container
Posted: May 24, 2012 8:08 AM   in response to: patg in response to: patg
 
  Click to reply to this thread Reply
Hi,

A quick question, did you already set proxy in maven configuration settings.xml?

Freeman
patg

Posts: 20
Registered: 09/01/10
Re: [Fabric] can't create remote container
Posted: May 24, 2012 8:36 AM   in response to: ffang in response to: ffang
 
  Click to reply to this thread Reply
Yes I did. I use this maven settings daily for development.
iocanel

Posts: 153
Registered: 03/16/10
Re: [Fabric] can't create remote container
Posted: May 24, 2012 8:47 AM   in response to: ffang in response to: ffang
 
  Click to reply to this thread Reply
Since you are using an http proxy you need to make sure that your environment is properly setup so that curl can run without issues. I think that adding the following environment variable will solve the issue:

http_proxy="http://username:password@host:port"

You mentioned that you have added the proxy to both /etc/profile and ~/.bashrc and it doesn't work. I usually add these stuff under ~/.profile:

http_proxy="http://username:password@host:port"
export http_proxy

and then try testing if curl works before doing anything else.
patg

Posts: 20
Registered: 09/01/10
Re: [Fabric] can't create remote container
Posted: May 24, 2012 9:05 AM   in response to: iocanel in response to: iocanel
 
  Click to reply to this thread Reply
As I said in my initial message, I already setup curl to use my authenticating proxy (on both machines).

I can ssh and use curl through my proxy with no problem, however Fabric fails to download the artifacts.

Edited by: patg on May 24, 2012 9:05 AM

Edited by: patg on May 24, 2012 9:28 AM
iocanel

Posts: 153
Registered: 03/16/10
Re: [Fabric] can't create remote container
Posted: May 24, 2012 9:32 AM   in response to: patg in response to: patg
Helpful
  Click to reply to this thread Reply
Apologies, I didn't realized that you tried running curl from adminuser@192.168.102.190 and worked.

This is a bit strange because fabric itself will use curl from bash with the following syntax:
curl --write-out %{http_code} --silent --output $TARGET_FILE $URL

Till we find out what's preventing curl to run from the script that fabric generates, I would propose you the following work around:

Get the fabric tarball from: http://repo.fusesource.com/nexus/content/groups/public/org/fusesource/fabric/fuse-fabric/7.0.0.fuse-061/fuse-fabric-7.0.0.fuse-061.tar.gz and place it on salineos under ~/.m2/repository/org/fusesource/fabric/fuse-fabric/7.0.0.fuse-061/fuse-fabric-7.0.0.fuse-061.tar.gz or under ${karaf.home}/system/org/fusesource/fabric/fuse-fabric/7.0.0.fuse-061/fuse-fabric-7.0.0.fuse-061.tar.gz so that its downloadable from the fabric-maven-proxy which is running on salineos.
patg

Posts: 20
Registered: 09/01/10
Re: [Fabric] can't create remote container
Posted: May 24, 2012 10:51 AM   in response to: iocanel in response to: iocanel
 
  Click to reply to this thread Reply
It worked. Thanks very much for your help!

However I had to copy the tarball to ~/.m2/repository/org/fusesource/fabric/fuse-fabric/7.0.0.fuse-061/fuse-fabric-7.0.0.fuse-061.tar.gz

It won't find it under ${karaf.home}/system/org/fusesource/fabric/fuse-fabric/7.0.0.fuse-061/
iocanel

Posts: 153
Registered: 03/16/10
Re: [Fabric] can't create remote container
Posted: May 24, 2012 11:06 AM   in response to: patg in response to: patg
 
  Click to reply to this thread Reply
I am really glad to hear that this workaround worked for you.

I raised to jira issues on improving the offline and proxy support for remote container creation.