[one-users] OCCI Interface - HTTP commands

Daniel Molina dmolina at opennebula.org
Tue Mar 22 03:17:04 PDT 2011


Hi,

Comments inline,

2011/3/21 João Soares <joaosoares at ua.pt>:
> Hi,
>
>
>
> I am trying to use the OCCI interface, I am able to launch VMs through the
> “occi-compute” command, but I am having some issues when trying to use for
> example the GET request:
>
> I create a VM by using the occi-compute which returns me the ID 129. Then:
>
>
>
> telnet localhost 4567
>
>
>
> GET /compute/129 HTTP/1.1
>
>
>
> Trying ::1...
> Trying 127.0.0.1...
> Connected to localhost.
> Escape character is '^]'.
> GET /compute/129 HTTP/1.1
>
> HTTP/1.1 500 Internal Server Error
> Content-Type: text/html
> Content-Length: 122449
> Connection: keep-alive
> Server: thin 1.2.8 codename Black Keys
>
> <!DOCTYPE html>
> <html>
> <head>
>   <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
>   <title>NoMethodError at /compute/129</title>
>
>   <script type="text/javascript">
>   //<!--
>   function toggle(id) {
>     var pre  = document.getElementById("pre-" + id);
>     var post = document.getElementById("post-" + id);
>     var context = document.getElementById("context-" + id);
>
>     if (pre.style.display == 'block') {
>       pre.style.display = 'none';
>       post.style.display = 'none';
>       context.style.background = "none";
>     } else {
>       pre.style.display = 'block';
>       post.style.display = 'block';
>       context.style.background = "#fffed9";
>     }
>   }
>
>   function toggleBacktrace(){
>
> ................................................... (continues)……
>
>            <td>rack.version</td>
>            <td class="code"><div>[1, 0]</div></td>
>          </tr>
>
>          <tr>
>            <td>sinatra.error</td>
>            <td class="code"><div>#<NoMethodError: private method
> `split' called for nil:NilClass></div></td>
>          </tr>
>
>       </table>
>       <div class="clear"></div>
>     </div> <!-- /RACK ENV -->
>
>     <p id="explanation">You're seeing this error because you have
> enabled the <code>show_exceptions</code> setting.</p>
>   </div> <!-- /WRAP -->
>   </body>
> </html>
>

Would you mind to send the $ONE_LOCATION/var/occi-server.log file and
the output of the following command, `onevm show 129 -x`? What
OpenNebula version are you using?

>
> On the other hand, if I try:
>
>
> GET /compute/ HTTP/1.1
>
> HTTP/1.1 404 Not Found
> X-Cascade: pass
> Content-Type: text/html;charset=utf-8
> Content-Length: 417
> Connection: keep-alive
> Server: thin 1.2.8 codename Black Keys
>
> <!DOCTYPE html>
> <html>
> <head>
>   <style type="text/css">
>   body { text-align:center;font-family:helvetica,arial;font-size:22px;
>     color:#888;margin:20px}
>   #c {margin:0 auto;width:500px;text-align:left}
>   </style>
> </head>
> <body>
>   <h2>Sinatra doesn't know this ditty.</h2>
>   <img src='/__sinatra__/404.png'>
>   <div id="c">
>     Try this:
>     <pre>get '/compute/' do
>   "Hello World"
> end</pre>
>   </div>
> </body>
> </html>
>
>

Try sending the following request "GET /compute" instead of "GET /compute/"?

>
> I am not fully aware how the interface works so I might be making a silly
> mistake…any help?
>
>
>
> Thanks in advanced,
>
>
>
> João
>
> _______________________________________________
> Users mailing list
> Users at lists.opennebula.org
> http://lists.opennebula.org/listinfo.cgi/users-opennebula.org
>
>

Regards

-- 
Daniel Molina, Cloud Technology Engineer/Researcher
Major Contributor
OpenNebula - The Open Source Toolkit for Cloud Computing
www.OpenNebula.org | dmolina at opennebula.org



More information about the Users mailing list