# Cannot import appliance from Appmarket

**URL:** <https://forum.opennebula.io/t/cannot-import-appliance-from-appmarket/1444>\
**Category:** Product Support\
**Created:** [November 9, 2015, 10:03am UTC](https://forum.opennebula.io/t/cannot-import-appliance-from-appmarket/1444 "2015-11-09T10:03:18Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![esierrap](https://avatars.discourse-cdn.com/v4/letter/e/4da419/32.png) [@esierrap](https://forum.opennebula.io/u/esierrap)\
**Post date:** [November 9, 2015, 10:03am UTC](https://forum.opennebula.io/t/cannot-import-appliance-from-appmarket/1444/1 "2015-11-09T10:03:18Z")

</div>

Hi!

I’m getting an error when trying to import an appliance from appmarket. This error is as follows:

Error copying image in the datastore: Error downloading  
http://${server}:6242/appliance/563b114ba1d055384900000f/download/3

And that link is inaccessible, but i don’t understand why. Our appmarket-server.conf:

# Host and port where AppMarket server will run

:host: 0.0.0.0  
:port: 6242

# DB

db\_host: localhost  
db\_port: 27017

# Define this parameter if the AppMarket is running under a reverse proxy

# Example: Apache

# \<VirtualHost \*:80\>

# …

# ProxyPass /market/ [http://localhost:6242/](http://localhost:6242/)

# ProxyPassReverse /market/ [http://localhost:6242/](http://localhost:6242/)

# 

# 

# :proxy\_path: ‘/market/’

# 

:proxy\_path: ‘/’

# Admin credentials. This will be the user that will be used in the

# bootstrap process the first time the server is started

user:  
organization: \*\*\*\*\*\*\*\*\*\*\*\*\*\*  
first\_name: ATF  
last\_name: ATC  
username: \*\*\*\*\*\*\*  
password: \*\*\*\*\*\*\*  
website: default  
email: default

Have any idea, any idea what 's going on? Thanks in advance.

---

<div class="post-metadata">

**Author:** ![dmolina](https://yyz1.discourse-cdn.com/flex031/user_avatar/forum.opennebula.io/dmolina/32/22_2.png) [@dmolina](https://forum.opennebula.io/u/dmolina)\
**Post date:** [November 10, 2015, 10:05am UTC](https://forum.opennebula.io/t/cannot-import-appliance-from-appmarket/1444/2 "2015-11-10T10:05:32Z")

</div>

Hi,

Could you send us the appliance template? did you define more than one file for the appliance?

Cheers

---

<div class="post-metadata">

**Author:** ![esierrap](https://avatars.discourse-cdn.com/v4/letter/e/4da419/32.png) [@esierrap](https://forum.opennebula.io/u/esierrap)\
**Post date:** [November 10, 2015, 10:17am UTC](https://forum.opennebula.io/t/cannot-import-appliance-from-appmarket/1444/3 "2015-11-10T10:17:18Z")

</div>

First of all, thank you for your answer: Here is the template in question:

CONTEXT=[  
BL\_AREA="$BL\_AREA",  
FILES\_DS="$FILE[IMAGE\_ID=417]",  
INIT\_SCRIPTS=“[atf-init.sh](http://atf-init.sh)”,  
NETWORK=“YES”,  
NTP="$NTP",  
SEARCH\_DOMAIN="$SEARCH\_DOMAIN",  
SET\_HOSTNAME="$SET\_HOSTNAME",  
SSH\_PUBLIC\_KEY="$USER[SSH\_PUBLIC\_KEY]" ]  
CPU="2"  
DISK=[  
DEV\_PREFIX=“vd”,  
DRIVER=“qcow2”,  
IMAGE=“JBOSS-JWS-3.3-RHEL66.X64.ATF.PRB.disk1”,  
IMAGE\_UNAME=“oneadmin” ]  
DISK=[  
DEV\_PREFIX=“vd”,  
DRIVER=“qcow2”,  
IMAGE=“JBOSS-JWS-3.3-RHEL66.X64.ATF.PRB.disk2”,  
IMAGE\_UNAME=“oneadmin” ]  
DISK=[  
DEV\_PREFIX=“vd”,  
DRIVER=“qcow2”,  
IMAGE=“JBOSS-JWS-3.3-RHEL66.X64.ATF.PRB.disk3”,  
IMAGE\_UNAME=“oneadmin” ]  
DISK=[  
DEV\_PREFIX=“vd”,  
DRIVER=“qcow2”,  
IMAGE=“JBOSS-JWS-3.3-RHEL66.X64.ATF.PRB.disk4”,  
IMAGE\_UNAME=“oneadmin” ]  
FROM\_APP="54f985c1a1d05513be000049"  
FROM\_APP\_NAME="TIBCO-BW-5.11-RHEL-65.X64.ATF.PRB"  
GRAPHICS=[  
KEYMAP=“es”,  
LISTEN=“0.0.0.0”,  
TYPE=“VNC” ]  
MEMORY="4096"  
NIC=[  
NETWORK=“ManagementNetwork\_VLAN309”,  
NETWORK\_UNAME=“oneadmin” ]  
NIC=[  
NETWORK=“ServiceNetwork\_VLAN409”,  
NETWORK\_UNAME=“oneadmin” ]  
USER\_INPUTS=[  
BL\_AREA=“M|text|BL\_AREA: Choose the server node where agent will register between (BRAZIL, CB-UK, MEXICO, R-UK and SPAIN).”,  
NTP=“M|text|NTP: Network Time Protocol server 0”,  
SEARCH\_DOMAIN=“M|text|Domain: DNS domain.”,  
SET\_HOSTNAME=“M|text|Hostname: Unique label assigned to a device connected to a computer.” ]

---

<div class="post-metadata">

**Author:** ![dmolina](https://yyz1.discourse-cdn.com/flex031/user_avatar/forum.opennebula.io/dmolina/32/22_2.png) [@dmolina](https://forum.opennebula.io/u/dmolina)\
**Post date:** [November 10, 2015, 10:26am UTC](https://forum.opennebula.io/t/cannot-import-appliance-from-appmarket/1444/4 "2015-11-10T10:26:54Z")

</div>

Hi,

It looks like the problem is the file number 3. Could you check that the url defined for this file in the appmarket is accesible from the machine where oned is running? You can get more info of the error in oned.log after trying to import the appliance.

---

<div class="post-metadata">

**Author:** ![esierrap](https://avatars.discourse-cdn.com/v4/letter/e/4da419/32.png) [@esierrap](https://forum.opennebula.io/u/esierrap)\
**Post date:** [November 10, 2015, 12:12pm UTC](https://forum.opennebula.io/t/cannot-import-appliance-from-appmarket/1444/5 "2015-11-10T12:12:19Z")

</div>

Yes, it is accesible as you can see:

oneadmin@vmlbcnblal03:~$ wget http:// server:6242/appliance/563b114ba1d055384900000f/download/3  
–2015-11-10 13:05:59-- http:// server:6242/appliance/563b114ba1d055384900000f/download/3  
Resolving server… serverip  
Connecting to server|serverip|:6242… connected.  
HTTP request sent, awaiting response… 302 Moved Temporarily  
Location: http:// localhost/b114f936-69d3-4e3c-8fdc-c00689baa35d [following]  
–2015-11-10 13:05:59-- http:// localhost/b114f936-69d3-4e3c-8fdc-c00689baa35d  
Resolving localhost… 127.0.0.1, ::1  
Connecting to localhost|127.0.0.1|:80… connected.  
HTTP request sent, awaiting response… 200 OK  
Length: 788135936 (752M) [text/plain]  
Saving to: â3â

3% [==\>] 24,100,864 889K/s eta 18m 51s

In oned.log i can find the following lines:

Tue Nov 10 12:58:47 2015 [Z0][ImM][E]: cp: Command “/var/lib/one/remotes/datastore/fs/…/downloader.sh --md5 68d4bb460b8719aae50b1e137056eab0 --sha1 d537b4a47914d2f126fbc3cf924b28e55ebd36b3 http:// server:6242/appliance/563b114ba1d055384900000f/download/3 /var/lib/one//datastores/103/daa9ae98c6a58be984dea1dbd318fdf7” failed: curl: (18) transfer closed with 549441536 bytes remaining to read  
Tue Nov 10 12:58:47 2015 [Z0][ImM][E]: Error downloading http:// server :6242/appliance/563b114ba1d055384900000f/download/3  
Tue Nov 10 12:58:47 2015 [Z0][ImM][E]: Error copying image in the datastore: Error downloading http:// server :6242/appliance/563b114ba1d055384900000f/download/3
