<div dir="ltr">Hi all,<div><br></div><div>I'm trying to make requests to the occi server using curl command but got no anwers: </div><div><br></div><div><blockquote class="gmail_quote" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0.8ex; border-left-width: 1px; border-left-color: rgb(204, 204, 204); border-left-style: solid; padding-left: 1ex; ">
oneadmin@ena-desktop:~$ curl -X GET <a href="http://localhost:3000">http://localhost:3000</a><br>oneadmin@ena-desktop:~$ curl -X GET <a href="http://localhost:3000/">http://localhost:3000/</a><br>oneadmin@ena-desktop:~$ curl -X GET <a href="http://localhost:3000/network/">http://localhost:3000/network/</a></blockquote>
</div><div><br></div><div>The occi-server logs are : passenger.3000.log</div><div><br></div><div><blockquote class="gmail_quote" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0.8ex; border-left-width: 1px; border-left-color: rgb(204, 204, 204); border-left-style: solid; padding-left: 1ex; ">
D, [2011-08-31T20:02:33.963033 #1627] DEBUG -- : #################################<br>D, [2011-08-31T20:02:33.963112 #1627] DEBUG -- : Accept type: */*<br>D, [2011-08-31T20:02:33.963164 #1627] DEBUG -- : Content type: text/plain<br>
D, [2011-08-31T20:02:33.963481 #1627] DEBUG -- : Response headers: Content-Typetext/plainServerOCCI/1.1<br>D, [2011-08-31T20:02:33.963535 #1627] DEBUG -- : Response body: <br>127.0.0.1 - - [31/Aug/2011 20:02:33] "POST /network/ " 400 - 0.0985<br>
D, [2011-08-31T20:06:36.532413 #1627] DEBUG -- : Requested location: /network/<br>D, [2011-08-31T20:06:36.532667 #1627] DEBUG -- : * location: storagelink : object: #<OCCI::Core::Kind:0xb6d264e4><br>D, [2011-08-31T20:06:36.532759 #1627] DEBUG -- : * location: networkinterface : object: #<OCCI::Core::Kind:0xb6d29324><br>
D, [2011-08-31T20:06:36.532820 #1627] DEBUG -- : * location: network : object: #<OCCI::Core::Kind:0xb6d2d76c><br>D, [2011-08-31T20:06:36.532905 #1627] DEBUG -- : * location: compute : object: #<OCCI::Core::Kind:0xb6d34d28><br>
D, [2011-08-31T20:06:36.532976 #1627] DEBUG -- : * location: ipnetworking : object: #<OCCI::Core::Mixin:0xb6d1c9f8><br>D, [2011-08-31T20:06:36.533057 #1627] DEBUG -- : * location: storage : object: #<OCCI::Core::Kind:0xb6d30944><br>
D, [2011-08-31T20:06:36.533136 #1627] DEBUG -- : * location: link : object: #<OCCI::Core::Kind:0xb6d29630><br>D, [2011-08-31T20:06:36.533205 #1627] DEBUG -- : * context: _/hash/<br>I, [2011-08-31T20:06:36.533333 #1627] INFO -- : Kind / mixin exact match for location [/network/]: #<OCCI::Core::Kind:0xb6d2d76c><br>
D, [2011-08-31T20:06:36.533420 #1627] DEBUG -- : ### Information on the client ###<br>D, [2011-08-31T20:06:36.533473 #1627] DEBUG -- : Client IP Adress: 127.0.0.1<br>D, [2011-08-31T20:06:36.533547 #1627] DEBUG -- : Client User Agent: curl/7.19.7 (i486-pc-linux-gnu) libcurl/7.19.7 OpenSSL/0.9.8k zlib/<a href="http://1.2.3.3">1.2.3.3</a> libidn/1.15<br>
D, [2011-08-31T20:06:36.533631 #1627] DEBUG -- : #################################<br>D, [2011-08-31T20:06:36.533688 #1627] DEBUG -- : Accept type: */*<br>D, [2011-08-31T20:06:36.533762 #1627] DEBUG -- : Content type: text/plain<br>
D, [2011-08-31T20:06:36.533864 #1627] DEBUG -- : Response headers: Content-Typetext/plainServerOCCI/1.1<br>D, [2011-08-31T20:06:36.533938 #1627] DEBUG -- : Response body: <br>127.0.0.1 - - [31/Aug/2011 20:06:36] "GET /network/ " 200 - 0.0039</blockquote>
<div><br></div><div><br><br><br>Using the verbose mode I get :</div><div><br></div><blockquote class="gmail_quote" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0.8ex; border-left-width: 1px; border-left-color: rgb(204, 204, 204); border-left-style: solid; padding-left: 1ex; ">
<blockquote class="gmail_quote" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0.8ex; border-left-width: 1px; border-left-color: rgb(204, 204, 204); border-left-style: solid; padding-left: 1ex; ">
oneadmin@ena-desktop:~$ curl -v -X GET <a href="http://localhost:3000/network/">http://localhost:3000/network/</a></blockquote><blockquote class="gmail_quote" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0.8ex; border-left-width: 1px; border-left-color: rgb(204, 204, 204); border-left-style: solid; padding-left: 1ex; ">
* About to connect() to localhost port 3000 (#0)</blockquote><blockquote class="gmail_quote" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0.8ex; border-left-width: 1px; border-left-color: rgb(204, 204, 204); border-left-style: solid; padding-left: 1ex; ">
* Trying ::1... Connection refused</blockquote><blockquote class="gmail_quote" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0.8ex; border-left-width: 1px; border-left-color: rgb(204, 204, 204); border-left-style: solid; padding-left: 1ex; ">
* Trying 127.0.0.1... connected</blockquote><blockquote class="gmail_quote" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0.8ex; border-left-width: 1px; border-left-color: rgb(204, 204, 204); border-left-style: solid; padding-left: 1ex; ">
* Connected to localhost (127.0.0.1) port 3000 (#0)</blockquote><blockquote class="gmail_quote" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0.8ex; border-left-width: 1px; border-left-color: rgb(204, 204, 204); border-left-style: solid; padding-left: 1ex; ">
> GET /network/ HTTP/1.1</blockquote><blockquote class="gmail_quote" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0.8ex; border-left-width: 1px; border-left-color: rgb(204, 204, 204); border-left-style: solid; padding-left: 1ex; ">
> User-Agent: curl/7.19.7 (i486-pc-linux-gnu) libcurl/7.19.7 OpenSSL/0.9.8k zlib/<a href="http://1.2.3.3">1.2.3.3</a> libidn/1.15</blockquote><blockquote class="gmail_quote" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0.8ex; border-left-width: 1px; border-left-color: rgb(204, 204, 204); border-left-style: solid; padding-left: 1ex; ">
> Host: localhost:3000</blockquote><blockquote class="gmail_quote" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0.8ex; border-left-width: 1px; border-left-color: rgb(204, 204, 204); border-left-style: solid; padding-left: 1ex; ">
> Accept: */*</blockquote><blockquote class="gmail_quote" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0.8ex; border-left-width: 1px; border-left-color: rgb(204, 204, 204); border-left-style: solid; padding-left: 1ex; ">
> </blockquote><blockquote class="gmail_quote" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0.8ex; border-left-width: 1px; border-left-color: rgb(204, 204, 204); border-left-style: solid; padding-left: 1ex; ">
< HTTP/1.1 200 OK</blockquote><blockquote class="gmail_quote" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0.8ex; border-left-width: 1px; border-left-color: rgb(204, 204, 204); border-left-style: solid; padding-left: 1ex; ">
< Content-Type: text/plain</blockquote><blockquote class="gmail_quote" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0.8ex; border-left-width: 1px; border-left-color: rgb(204, 204, 204); border-left-style: solid; padding-left: 1ex; ">
< Connection: keep-alive</blockquote><blockquote class="gmail_quote" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0.8ex; border-left-width: 1px; border-left-color: rgb(204, 204, 204); border-left-style: solid; padding-left: 1ex; ">
< Status: 200</blockquote><blockquote class="gmail_quote" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0.8ex; border-left-width: 1px; border-left-color: rgb(204, 204, 204); border-left-style: solid; padding-left: 1ex; ">
< X-Powered-By: Phusion Passenger (mod_rails/mod_rack) 3.0.8</blockquote><blockquote class="gmail_quote" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0.8ex; border-left-width: 1px; border-left-color: rgb(204, 204, 204); border-left-style: solid; padding-left: 1ex; ">
< Content-Length: 0</blockquote><blockquote class="gmail_quote" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0.8ex; border-left-width: 1px; border-left-color: rgb(204, 204, 204); border-left-style: solid; padding-left: 1ex; ">
< Server: OCCI/1.1</blockquote><blockquote class="gmail_quote" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0.8ex; border-left-width: 1px; border-left-color: rgb(204, 204, 204); border-left-style: solid; padding-left: 1ex; ">
< </blockquote><blockquote class="gmail_quote" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0.8ex; border-left-width: 1px; border-left-color: rgb(204, 204, 204); border-left-style: solid; padding-left: 1ex; ">
* Connection #0 to host localhost left intact</blockquote><blockquote class="gmail_quote" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0.8ex; border-left-width: 1px; border-left-color: rgb(204, 204, 204); border-left-style: solid; padding-left: 1ex; ">
* Closing connection #0</blockquote><div><br></div></blockquote><div><br></div><div>POST Request also failed :</div><div><br></div><blockquote class="gmail_quote" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0.8ex; border-left-width: 1px; border-left-color: rgb(204, 204, 204); border-left-style: solid; padding-left: 1ex; ">
oneadmin@ena-desktop:~$ curl -v -X POST --header 'Category: network;scheme="<a href="http://schemas.ogf.org/occi/infrastructure#">http://schemas.ogf.org/occi/infrastructure#</a>";class="kind";,virtualnetwork; scheme="<a href="http://schemas.opennebula.org/occi/infrastructure#">http://schemas.opennebula.org/occi/infrastructure#</a>";class="mixin";' --header 'X-OCCI-Attribute: occi.core.title="My Network",occi.core.summary="A short summary", opennebula.network.size=256, opennebula.network.address="192.168.0.0",opennebula.network.bridge=virbr0,opennebula.network.public=YES,opennebula.network.type=RANGED' <a href="http://localhost:3000/network/">http://localhost:3000/network/</a></blockquote>
<blockquote class="gmail_quote" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0.8ex; border-left-width: 1px; border-left-color: rgb(204, 204, 204); border-left-style: solid; padding-left: 1ex; ">
* About to connect() to localhost port 3000 (#0)</blockquote><blockquote class="gmail_quote" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0.8ex; border-left-width: 1px; border-left-color: rgb(204, 204, 204); border-left-style: solid; padding-left: 1ex; ">
* Trying ::1... Connection refused</blockquote><blockquote class="gmail_quote" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0.8ex; border-left-width: 1px; border-left-color: rgb(204, 204, 204); border-left-style: solid; padding-left: 1ex; ">
* Trying 127.0.0.1... connected</blockquote><blockquote class="gmail_quote" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0.8ex; border-left-width: 1px; border-left-color: rgb(204, 204, 204); border-left-style: solid; padding-left: 1ex; ">
* Connected to localhost (127.0.0.1) port 3000 (#0)</blockquote><blockquote class="gmail_quote" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0.8ex; border-left-width: 1px; border-left-color: rgb(204, 204, 204); border-left-style: solid; padding-left: 1ex; ">
> POST /network/ HTTP/1.1</blockquote><blockquote class="gmail_quote" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0.8ex; border-left-width: 1px; border-left-color: rgb(204, 204, 204); border-left-style: solid; padding-left: 1ex; ">
> User-Agent: curl/7.19.7 (i486-pc-linux-gnu) libcurl/7.19.7 OpenSSL/0.9.8k zlib/<a href="http://1.2.3.3">1.2.3.3</a> libidn/1.15</blockquote><blockquote class="gmail_quote" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0.8ex; border-left-width: 1px; border-left-color: rgb(204, 204, 204); border-left-style: solid; padding-left: 1ex; ">
> Host: localhost:3000</blockquote><blockquote class="gmail_quote" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0.8ex; border-left-width: 1px; border-left-color: rgb(204, 204, 204); border-left-style: solid; padding-left: 1ex; ">
> Accept: */*</blockquote><blockquote class="gmail_quote" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0.8ex; border-left-width: 1px; border-left-color: rgb(204, 204, 204); border-left-style: solid; padding-left: 1ex; ">
> Category: network;scheme="<a href="http://schemas.ogf.org/occi/infrastructure#">http://schemas.ogf.org/occi/infrastructure#</a>";class="kind";,virtualnetwork; scheme="<a href="http://schemas.opennebula.org/occi/infrastructure#">http://schemas.opennebula.org/occi/infrastructure#</a>";class="mixin";</blockquote>
<blockquote class="gmail_quote" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0.8ex; border-left-width: 1px; border-left-color: rgb(204, 204, 204); border-left-style: solid; padding-left: 1ex; ">
> X-OCCI-Attribute: occi.core.title="My Network",occi.core.summary="A short summary", opennebula.network.size=256, opennebula.network.address="192.168.0.0",opennebula.network.bridge=virbr0,opennebula.network.public=YES,opennebula.network.type=RANGED</blockquote>
<blockquote class="gmail_quote" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0.8ex; border-left-width: 1px; border-left-color: rgb(204, 204, 204); border-left-style: solid; padding-left: 1ex; ">
> </blockquote><blockquote class="gmail_quote" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0.8ex; border-left-width: 1px; border-left-color: rgb(204, 204, 204); border-left-style: solid; padding-left: 1ex; ">
< HTTP/1.1 400 Bad Request</blockquote><blockquote class="gmail_quote" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0.8ex; border-left-width: 1px; border-left-color: rgb(204, 204, 204); border-left-style: solid; padding-left: 1ex; ">
< Content-Type: text/plain</blockquote><blockquote class="gmail_quote" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0.8ex; border-left-width: 1px; border-left-color: rgb(204, 204, 204); border-left-style: solid; padding-left: 1ex; ">
< Connection: keep-alive</blockquote><blockquote class="gmail_quote" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0.8ex; border-left-width: 1px; border-left-color: rgb(204, 204, 204); border-left-style: solid; padding-left: 1ex; ">
< Status: 400</blockquote><blockquote class="gmail_quote" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0.8ex; border-left-width: 1px; border-left-color: rgb(204, 204, 204); border-left-style: solid; padding-left: 1ex; ">
< X-Powered-By: Phusion Passenger (mod_rails/mod_rack) 3.0.8</blockquote><blockquote class="gmail_quote" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0.8ex; border-left-width: 1px; border-left-color: rgb(204, 204, 204); border-left-style: solid; padding-left: 1ex; ">
< Content-Length: 0</blockquote><blockquote class="gmail_quote" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0.8ex; border-left-width: 1px; border-left-color: rgb(204, 204, 204); border-left-style: solid; padding-left: 1ex; ">
< Server: OCCI/1.1</blockquote><blockquote class="gmail_quote" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0.8ex; border-left-width: 1px; border-left-color: rgb(204, 204, 204); border-left-style: solid; padding-left: 1ex; ">
< </blockquote><blockquote class="gmail_quote" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0.8ex; border-left-width: 1px; border-left-color: rgb(204, 204, 204); border-left-style: solid; padding-left: 1ex; ">
* Connection #0 to host localhost left intact</blockquote><blockquote class="gmail_quote" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0.8ex; border-left-width: 1px; border-left-color: rgb(204, 204, 204); border-left-style: solid; padding-left: 1ex; ">
* Closing connection #0</blockquote><div><br></div><div>Any suggestions on how to make successful HTTP request ?</div></div><div><br></div><div>Regards,</div><div><br></div><div>Amine</div></div>