Sunstone crashes when trying to download an image

Hello guys,

When trying to download the Ubuntu 16.04 KVM image from the marketplace, sunstone becomes unreachable and throw this error in sunstone.error :

/usr/lib/ruby/1.9.1/open3.rb:202:inspawn’: No such file or directory - DRV_ACTION=PERTX0RSSVZFUl9BQ1RJT05fREFUQT48TUFSS0VUUExBQ0U+CiAgPElEPjA8L0lEPgogIDxVSUQ+MDwvVUlEPgogIDxHSUQ+MDwvR0lEPgogIDxVTkFNRT5vbmVhZG1pbjwvVU5BTUU+CiAgPEdOQU1FPm9uZWFkbWluPC9HTkFNRT4KICA8TkFNRT5PcGVuTmVidWxhIFB1YmxpYzwvTkFNRT4KICA8TUFSS0VUX01BRD48IVtDREFUQVtvbmVdXT48L01BUktFVF9NQUQ+CiAgPFpPTkVfSUQ+PCFbQ0RBVEFbMF1dPjwvWk9ORV9JRD4KICA8VE9UQUxfTUI+MDwvVE9UQUxfTUI+CiAgPEZSRUVfTUI+MDwvRlJFRV9NQj4KICA8VVNFRF9NQj4wPC9VU0VEX01CPgogIDxNQVJLRVRQTEFDRUFQUFM+CiAgICA8SUQ+MDwvSUQ+CiAgICA8SUQ+MTwvSUQ+CiAgICA8SUQ+MjwvSUQ+CiAgICA8SUQ+MzwvSUQ+CiAgICA8SUQ+NDwvSUQ+CiAgICA8SUQ+NTwvSUQ+CiAgICA8SUQ+NjwvSUQ+CiAgICA8SUQ+NzwvSUQ+CiAgICA8SUQ+ODwvSUQ+CiAgICA8SUQ+OTwvSUQ+CiAgICA8SUQ+MTA8L0lEPgogICAgPElEPjExPC9JRD4KICAgIDxJRD4xMjwvSUQ+CiAgICA8SUQ+MTM8L0lEPgogICAgPElEPjE0PC9JRD4KICAgIDxJRD4xNTwvSUQ+CiAgICA8SUQ+MTY8L0lEPgogICAgPElEPjE3PC9JRD4KICAgIDxJRD4xODwvSUQ+CiAgICA8SUQ+MTk8L0lEPgogICAgPElEPjIwPC9JRD4KICAgIDxJRD4yMTwvSUQ+CiAgICA8SUQ+MjI8L0lEP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0VUUExBQ0U+PC9EU19EUklWRVJfQUNUSU9OX0RBVEE+ /var/lib/one/remotes/datastore/downloader.sh http://marketplace.opennebula.systems//appliance/575fcaa28fb81d438c000001/download/0 - (Errno::ENOENT)
from /usr/lib/ruby/1.9.1/open3.rb:202:in popen_run' from /usr/lib/ruby/1.9.1/open3.rb:90:inpopen3’
from /usr/lib/one/sunstone/sunstone-server.rb:789:in block (2 levels) in <main>' from /usr/lib/ruby/vendor_ruby/sinatra/base.rb:430:inblock (2 levels) in stream’
from /usr/lib/ruby/vendor_ruby/sinatra/base.rb:620:in with_params' from /usr/lib/ruby/vendor_ruby/sinatra/base.rb:430:inblock in stream’
from /usr/lib/ruby/vendor_ruby/sinatra/base.rb:396:in call' from /usr/lib/ruby/vendor_ruby/sinatra/base.rb:396:inblock in each’
from /usr/lib/ruby/vendor_ruby/eventmachine.rb:1037:in call' from /usr/lib/ruby/vendor_ruby/eventmachine.rb:1037:inblock in spawn_threadpool’
`

Any help on this would be much appreciated !

Thanks
Cyrille

the error is base64 encoded, here is the “real” message:

<DS_DRIVER_ACTION_DATA><MARKETPLACE>
  <ID>0</ID>
  <UID>0</UID>
  <GID>0</GID>
  <UNAME>oneadmin</UNAME>
  <GNAME>oneadmin</GNAME>
  <NAME>OpenNebula Public</NAME>
  <MARKET_MAD><![CDATA[one]]></MARKET_MAD>
  <ZONE_ID><![CDATA[0]]></ZONE_ID>
  <TOTAL_MB>0</TOTAL_MB>
  <FREE_MB>0</FREE_MB>
  <USED_MB>0</USED_MB>
  <MARKETPLACEAPPS>
    <ID>0</ID>
    <ID>1</ID>
    <ID>2</ID>
    <ID>3</ID>
    <ID>4</ID>
    <ID>5</ID>
    <ID>6</ID>
    <ID>7</ID>
    <ID>8</ID>
    <ID>9</ID>
    <ID>10</ID>
    <ID>11</ID>
    <ID>12</ID>
    <ID>13</ID>
    <ID>14</ID>
    <ID>15</ID>
    <ID>16</ID>
    <ID>17</ID>
    <ID>18</ID>
    <ID>19</ID>
    <ID>20</ID>
    <ID>21</ID>
    <ID>22</ID>
    <ID>23</ID>
    <ID>24</ID>
    <ID>25</ID>
    <ID>26</ID>
    <ID>27</ID>
    <ID>28</ID>
    <ID>29</ID>
    <ID>30</ID>
    <ID>31</ID>
    <ID>32</ID>
    <ID>33</ID>
    <ID>34</ID>
    <ID>35</ID>
    <ID>36</ID>
    <ID>37</ID>
    <ID>38</ID>
    <ID>39</ID>
    <ID>40</ID>
    <ID>41</ID>
    <ID>42</ID>
    <ID>43</ID>
    <ID>44</ID>
    <ID>45</ID>
    <ID>46</ID>
  </MARKETPLACEAPPS>
  <PERMISSIONS>
    <OWNER_U>1</OWNER_U>
    <OWNER_M>1</OWNER_M>
    <OWNER_A>1</OWNER_A>
    <GROUP_U>1</GROUP_U>
    <GROUP_M>0</GROUP_M>
    <GROUP_A>0</GROUP_A>
    <OTHER_U>1</OTHER_U>
    <OTHER_M>0</OTHER_M>
    <OTHER_A>0</OTHER_A>
  </PERMISSIONS>
  <TEMPLATE>
    <DESCRIPTION><![CDATA[OpenNebula Systems MarketPlace]]></DESCRIPTION>
    <MARKET_MAD><![CDATA[one]]></MARKET_MAD>
  </TEMPLATE>
</MARKETPLACE></DS_DRIVER_ACTION_DATA>

but I’m not sure something here is helpful…
Could it be that the oneadmin user cannot read/write to your datastore location?
You could try that by creating a new image, like a datablock in your datastore and see if that works to start a VM. The Ruby error Errno::ENOENT means file not found, maybe the marketplace was offline at the time, or the image didnt download properly ?

hope this helps,
cheers

Hoho, thanks it helps indeed.

Not because the folder was not writable by oneadmin (because it was)
But because we have to select the Datastore to store the image, even if there is only one.
When selecting it it’s working.

But it’s still weird that Sunstone crashes when not selecting the datastore and still clicking on “Download”.

Download should not be clickable if the datastore is not selected, or an error message should be displayed.

#Feature-request :slight_smile:

It should actually display an error and do not start the download. In any case, sunstone server should not crash because of a malformed request. We’ll try to reproduce and fix it: Bug #4723: Sunstone crashes when trying to download an image - OpenNebula - OpenNebula Development pages