[one-users] What is this error in the occi-server >> dumping code to client ?

sebastien goasguen sebgoa at clemson.edu
Mon Oct 5 10:07:05 PDT 2009


Gary, I am trying to test the same thing.

Have you managed to upload an image with the occi-storage command first ?

occi-storage create --debug --username oneadmin --password opennebula
--url http://<yourhost>:4567 -M imagexml

where imagexml is a xml file describing the image..

I had to put the -M command to get it uploaded, now occi-storage list
works fine. I am going to try to instantiate the image.

-sebastien

On Sat, Oct 3, 2009 at 9:53 PM, Gary Mazz <garymazzaferro at gmail.com> wrote:
> Hi, I tried getting a list of storage objects from the occi interface. This
> is what is reported in occi-server.log and the command line output: \
> Command line: ./occi-network --username maria --password maria --url
> http://cloud.exxia.com:4567 list occi-server.log: 172.31.1.102 - -
> [03/Oct/2009 14:30:12] "GET /compute HTTP/1.1" 401 15 0.0060 NoMethodError:
> undefined method `bytesize' for #
> /usr/lib/ruby/gems/1.8/gems/sinatra-0.9.4/lib/sinatra/base.rb:46:in `finish'
> /home/garym/one/lib/ruby/occi/VirtualMachinePoolOCCI.rb:12:in `inject'
> /usr/lib/ruby/gems/1.8/gems/sinatra-0.9.4/lib/sinatra/base.rb:45:in `each'
> /usr/lib/ruby/gems/1.8/gems/sinatra-0.9.4/lib/sinatra/base.rb:45:in `inject'
> /usr/lib/ruby/gems/1.8/gems/sinatra-0.9.4/lib/sinatra/base.rb:45:in `finish'
> /usr/lib/ruby/gems/1.8/gems/sinatra-0.9.4/lib/sinatra/base.rb:378:in `call!'
> /usr/lib/ruby/gems/1.8/gems/sinatra-0.9.4/lib/sinatra/base.rb:364:in `call'
> /usr/lib/ruby/gems/1.8/gems/rack-1.0.0/lib/rack/showexceptions.rb:24:in
> `call'
> /usr/lib/ruby/gems/1.8/gems/rack-1.0.0/lib/rack/methodoverride.rb:24:in
> `call' /usr/lib/ruby/gems/1.8/gems/rack-1.0.0/lib/rack/commonlogger.rb:20:in
> `_call'
> /usr/lib/ruby/gems/1.8/gems/rack-1.0.0/lib/rack/commonlogger.rb:13:in `call'
> /usr/lib/ruby/gems/1.8/gems/sinatra-0.9.4/lib/sinatra/base.rb:898:in `call'
> /usr/lib/ruby/gems/1.8/gems/sinatra-0.9.4/lib/sinatra/base.rb:943:in
> `synchronize'
> /usr/lib/ruby/gems/1.8/gems/sinatra-0.9.4/lib/sinatra/base.rb:898:in `call'
> /usr/lib/ruby/gems/1.8/gems/rack-1.0.0/lib/rack/content_length.rb:13:in
> `call' /usr/lib/ruby/gems/1.8/gems/rack-1.0.0/lib/rack/chunked.rb:15:in
> `call' /usr/lib/ruby/gems/1.8/gems/thin-1.2.4/lib/thin/connection.rb:76:in
> `pre_process'
> /usr/lib/ruby/gems/1.8/gems/thin-1.2.4/lib/thin/connection.rb:74:in `catch'
> /usr/lib/ruby/gems/1.8/gems/thin-1.2.4/lib/thin/connection.rb:74:in
> `pre_process'
> /usr/lib/ruby/gems/1.8/gems/thin-1.2.4/lib/thin/connection.rb:57:in
> `process'
> /usr/lib/ruby/gems/1.8/gems/thin-1.2.4/lib/thin/connection.rb:42:in
> `receive_data'
> /usr/lib/ruby/gems/1.8/gems/eventmachine-0.12.8/lib/eventmachine.rb:242:in
> `run_machine'
> /usr/lib/ruby/gems/1.8/gems/eventmachine-0.12.8/lib/eventmachine.rb:242:in
> `run' /usr/lib/ruby/gems/1.8/gems/thin-1.2.4/lib/thin/backends/base.rb:57:in
> `start' /usr/lib/ruby/gems/1.8/gems/thin-1.2.4/lib/thin/server.rb:156:in
> `start'
> /usr/lib/ruby/gems/1.8/gems/rack-1.0.0/lib/rack/handler/thin.rb:14:in `run'
> /usr/lib/ruby/gems/1.8/gems/sinatra-0.9.4/lib/sinatra/base.rb:866:in `run!'
> /usr/lib/ruby/gems/1.8/gems/sinatra-0.9.4/lib/sinatra/main.rb:34
> /home/garym/one/lib/ruby/occi/OCCIServer.rb:434 172.31.1.102 - -
> [03/Oct/2009 14:30:12] "GET /compute HTTP/1.1" 500 83257 0.0717 172.31.1.102
> - - [03/Oct/2009 14:31:35] "GET /compute HTTP/1.1" 401 15 0.0002
> NoMethodError: undefined method `bytesize' for #
> /usr/lib/ruby/gems/1.8/gems/sinatra-0.9.4/lib/sinatra/base.rb:46:in `finish'
> /home/garym/one/lib/ruby/occi/VirtualMachinePoolOCCI.rb:12:in `inject'
> /usr/lib/ruby/gems/1.8/gems/sinatra-0.9.4/lib/sinatra/base.rb:45:in `each'
> /usr/lib/ruby/gems/1.8/gems/sinatra-0.9.4/lib/sinatra/base.rb:45:in `inject'
> /usr/lib/ruby/gems/1.8/gems/sinatra-0.9.4/lib/sinatra/base.rb:45:in `finish'
> /usr/lib/ruby/gems/1.8/gems/sinatra-0.9.4/lib/sinatra/base.rb:378:in `call!'
> /usr/lib/ruby/gems/1.8/gems/sinatra-0.9.4/lib/sinatra/base.rb:364:in `call'
> /usr/lib/ruby/gems/1.8/gems/rack-1.0.0/lib/rack/showexceptions.rb:24:in
> `call'
> /usr/lib/ruby/gems/1.8/gems/rack-1.0.0/lib/rack/methodoverride.rb:24:in
> `call' /usr/lib/ruby/gems/1.8/gems/rack-1.0.0/lib/rack/commonlogger.rb:20:in
> `_call'
> /usr/lib/ruby/gems/1.8/gems/rack-1.0.0/lib/rack/commonlogger.rb:13:in `call'
> /usr/lib/ruby/gems/1.8/gems/sinatra-0.9.4/lib/sinatra/base.rb:898:in `call'
> /usr/lib/ruby/gems/1.8/gems/sinatra-0.9.4/lib/sinatra/base.rb:943:in
> `synchronize'
> /usr/lib/ruby/gems/1.8/gems/sinatra-0.9.4/lib/sinatra/base.rb:898:in `call'
> /usr/lib/ruby/gems/1.8/gems/rack-1.0.0/lib/rack/content_length.rb:13:in
> `call' /usr/lib/ruby/gems/1.8/gems/rack-1.0.0/lib/rack/chunked.rb:15:in
> `call' /usr/lib/ruby/gems/1.8/gems/thin-1.2.4/lib/thin/connection.rb:76:in
> `pre_process'
> /usr/lib/ruby/gems/1.8/gems/thin-1.2.4/lib/thin/connection.rb:74:in `catch'
> /usr/lib/ruby/gems/1.8/gems/thin-1.2.4/lib/thin/connection.rb:74:in
> `pre_process'
> /usr/lib/ruby/gems/1.8/gems/thin-1.2.4/lib/thin/connection.rb:57:in
> `process'
> /usr/lib/ruby/gems/1.8/gems/thin-1.2.4/lib/thin/connection.rb:42:in
> `receive_data'
> /usr/lib/ruby/gems/1.8/gems/eventmachine-0.12.8/lib/eventmachine.rb:242:in
> `run_machine'
> /usr/lib/ruby/gems/1.8/gems/eventmachine-0.12.8/lib/eventmachine.rb:242:in
> `run' /usr/lib/ruby/gems/1.8/gems/thin-1.2.4/lib/thin/backends/base.rb:57:in
> `start' /usr/lib/ruby/gems/1.8/gems/thin-1.2.4/lib/thin/server.rb:156:in
> `start'
> /usr/lib/ruby/gems/1.8/gems/rack-1.0.0/lib/rack/handler/thin.rb:14:in `run'
> /usr/lib/ruby/gems/1.8/gems/sinatra-0.9.4/lib/sinatra/base.rb:866:in `run!'
> /usr/lib/ruby/gems/1.8/gems/sinatra-0.9.4/lib/sinatra/main.rb:34
> /home/garym/one/lib/ruby/occi/OCCIServer.rb:434 172.31.1.102 - -
> [03/Oct/2009 14:31:35] "GET /compute HTTP/1.1" 500 83257 0.0503 172.31.1.102
> - - [03/Oct/2009 14:32:05] "GET /storage HTTP/1.1" 401 15 0.0008
> 172.31.1.102 - - [03/Oct/2009 14:32:05] "GET /storage HTTP/1.1" 200 19
> 0.0215 172.31.1.102 - - [03/Oct/2009 14:32:28] "GET /network HTTP/1.1" 401
> 15 0.0008 NoMethodError: undefined method `bytesize' for #
> /usr/lib/ruby/gems/1.8/gems/sinatra-0.9.4/lib/sinatra/base.rb:46:in `finish'
> /home/garym/one/lib/ruby/occi/VirtualNetworkPoolOCCI.rb:12:in `inject'
> /usr/lib/ruby/gems/1.8/gems/sinatra-0.9.4/lib/sinatra/base.rb:45:in `each'
> /usr/lib/ruby/gems/1.8/gems/sinatra-0.9.4/lib/sinatra/base.rb:45:in `inject'
> /usr/lib/ruby/gems/1.8/gems/sinatra-0.9.4/lib/sinatra/base.rb:45:in `finish'
> /usr/lib/ruby/gems/1.8/gems/sinatra-0.9.4/lib/sinatra/base.rb:378:in `call!'
> /usr/lib/ruby/gems/1.8/gems/sinatra-0.9.4/lib/sinatra/base.rb:364:in `call'
> /usr/lib/ruby/gems/1.8/gems/rack-1.0.0/lib/rack/showexceptions.rb:24:in
> `call'
> /usr/lib/ruby/gems/1.8/gems/rack-1.0.0/lib/rack/methodoverride.rb:24:in
> `call' /usr/lib/ruby/gems/1.8/gems/rack-1.0.0/lib/rack/commonlogger.rb:20:in
> `_call'
> /usr/lib/ruby/gems/1.8/gems/rack-1.0.0/lib/rack/commonlogger.rb:13:in `call'
> /usr/lib/ruby/gems/1.8/gems/sinatra-0.9.4/lib/sinatra/base.rb:898:in `call'
> /usr/lib/ruby/gems/1.8/gems/sinatra-0.9.4/lib/sinatra/base.rb:943:in
> `synchronize'
> /usr/lib/ruby/gems/1.8/gems/sinatra-0.9.4/lib/sinatra/base.rb:898:in `call'
> /usr/lib/ruby/gems/1.8/gems/rack-1.0.0/lib/rack/content_length.rb:13:in
> `call' /usr/lib/ruby/gems/1.8/gems/rack-1.0.0/lib/rack/chunked.rb:15:in
> `call' /usr/lib/ruby/gems/1.8/gems/thin-1.2.4/lib/thin/connection.rb:76:in
> `pre_process'
> /usr/lib/ruby/gems/1.8/gems/thin-1.2.4/lib/thin/connection.rb:74:in `catch'
> /usr/lib/ruby/gems/1.8/gems/thin-1.2.4/lib/thin/connection.rb:74:in
> `pre_process'
> /usr/lib/ruby/gems/1.8/gems/thin-1.2.4/lib/thin/connection.rb:57:in
> `process'
> /usr/lib/ruby/gems/1.8/gems/thin-1.2.4/lib/thin/connection.rb:42:in
> `receive_data'
> /usr/lib/ruby/gems/1.8/gems/eventmachine-0.12.8/lib/eventmachine.rb:242:in
> `run_machine'
> /usr/lib/ruby/gems/1.8/gems/eventmachine-0.12.8/lib/eventmachine.rb:242:in
> `run' /usr/lib/ruby/gems/1.8/gems/thin-1.2.4/lib/thin/backends/base.rb:57:in
> `start' /usr/lib/ruby/gems/1.8/gems/thin-1.2.4/lib/thin/server.rb:156:in
> `start'
> /usr/lib/ruby/gems/1.8/gems/rack-1.0.0/lib/rack/handler/thin.rb:14:in `run'
> /usr/lib/ruby/gems/1.8/gems/sinatra-0.9.4/lib/sinatra/base.rb:866:in `run!'
> /usr/lib/ruby/gems/1.8/gems/sinatra-0.9.4/lib/sinatra/main.rb:34
> /home/garym/one/lib/ruby/occi/OCCIServer.rb:434 172.31.1.102 - -
> [03/Oct/2009 14:32:28] "GET /network HTTP/1.1" 500 83287 0.0247 172.31.1.102
> - - [03/Oct/2009 14:33:02] "GET /network HTTP/1.1" 401 15 0.0004
> NoMethodError: undefined method `bytesize' for #
> /usr/lib/ruby/gems/1.8/gems/sinatra-0.9.4/lib/sinatra/base.rb:46:in `finish'
> /home/garym/one/lib/ruby/occi/VirtualNetworkPoolOCCI.rb:12:in `inject'
> /usr/lib/ruby/gems/1.8/gems/sinatra-0.9.4/lib/sinatra/base.rb:45:in `each'
> /usr/lib/ruby/gems/1.8/gems/sinatra-0.9.4/lib/sinatra/base.rb:45:in `inject'
> /usr/lib/ruby/gems/1.8/gems/sinatra-0.9.4/lib/sinatra/base.rb:45:in `finish'
> /usr/lib/ruby/gems/1.8/gems/sinatra-0.9.4/lib/sinatra/base.rb:378:in `call!'
> /usr/lib/ruby/gems/1.8/gems/sinatra-0.9.4/lib/sinatra/base.rb:364:in `call'
> /usr/lib/ruby/gems/1.8/gems/rack-1.0.0/lib/rack/showexceptions.rb:24:in
> `call'
> /usr/lib/ruby/gems/1.8/gems/rack-1.0.0/lib/rack/methodoverride.rb:24:in
> `call' /usr/lib/ruby/gems/1.8/gems/rack-1.0.0/lib/rack/commonlogger.rb:20:in
> `_call'
> /usr/lib/ruby/gems/1.8/gems/rack-1.0.0/lib/rack/commonlogger.rb:13:in `call'
> /usr/lib/ruby/gems/1.8/gems/sinatra-0.9.4/lib/sinatra/base.rb:898:in `call'
> /usr/lib/ruby/gems/1.8/gems/sinatra-0.9.4/lib/sinatra/base.rb:943:in
> `synchronize'
> /usr/lib/ruby/gems/1.8/gems/sinatra-0.9.4/lib/sinatra/base.rb:898:in `call'
> /usr/lib/ruby/gems/1.8/gems/rack-1.0.0/lib/rack/content_length.rb:13:in
> `call' /usr/lib/ruby/gems/1.8/gems/rack-1.0.0/lib/rack/chunked.rb:15:in
> `call' /usr/lib/ruby/gems/1.8/gems/thin-1.2.4/lib/thin/connection.rb:76:in
> `pre_process'
> /usr/lib/ruby/gems/1.8/gems/thin-1.2.4/lib/thin/connection.rb:74:in `catch'
> /usr/lib/ruby/gems/1.8/gems/thin-1.2.4/lib/thin/connection.rb:74:in
> `pre_process'
> /usr/lib/ruby/gems/1.8/gems/thin-1.2.4/lib/thin/connection.rb:57:in
> `process'
> /usr/lib/ruby/gems/1.8/gems/thin-1.2.4/lib/thin/connection.rb:42:in
> `receive_data'
> /usr/lib/ruby/gems/1.8/gems/eventmachine-0.12.8/lib/eventmachine.rb:242:in
> `run_machine'
> /usr/lib/ruby/gems/1.8/gems/eventmachine-0.12.8/lib/eventmachine.rb:242:in
> `run' /usr/lib/ruby/gems/1.8/gems/thin-1.2.4/lib/thin/backends/base.rb:57:in
> `start' /usr/lib/ruby/gems/1.8/gems/thin-1.2.4/lib/thin/server.rb:156:in
> `start'
> /usr/lib/ruby/gems/1.8/gems/rack-1.0.0/lib/rack/handler/thin.rb:14:in `run'
> /usr/lib/ruby/gems/1.8/gems/sinatra-0.9.4/lib/sinatra/base.rb:866:in `run!'
> /usr/lib/ruby/gems/1.8/gems/sinatra-0.9.4/lib/sinatra/main.rb:34
> /home/garym/one/lib/ruby/occi/OCCIServer.rb:434 172.31.1.102 - -
> [03/Oct/2009 14:33:02] "GET /network HTTP/1.1" 500 83287 0.0262 172.31.1.102
> - - [03/Oct/2009 14:33:22] "GET /network HTTP/1.1" 401 15 0.0014
> 172.31.1.102 - - [03/Oct/2009 14:33:22] "GET /network HTTP/1.1" 401 15
> 0.0167 172.31.1.102 - - [03/Oct/2009 14:33:33] "GET /network HTTP/1.1" 401
> 15 0.0002 NoMethodError: undefined method `bytesize' for #
> /usr/lib/ruby/gems/1.8/gems/sinatra-0.9.4/lib/sinatra/base.rb:46:in `finish'
> /home/garym/one/lib/ruby/occi/VirtualNetworkPoolOCCI.rb:12:in `inject'
> /usr/lib/ruby/gems/1.8/gems/sinatra-0.9.4/lib/sinatra/base.rb:45:in `each'
> /usr/lib/ruby/gems/1.8/gems/sinatra-0.9.4/lib/sinatra/base.rb:45:in `inject'
> /usr/lib/ruby/gems/1.8/gems/sinatra-0.9.4/lib/sinatra/base.rb:45:in `finish'
> /usr/lib/ruby/gems/1.8/gems/sinatra-0.9.4/lib/sinatra/base.rb:378:in `call!'
> /usr/lib/ruby/gems/1.8/gems/sinatra-0.9.4/lib/sinatra/base.rb:364:in `call'
> /usr/lib/ruby/gems/1.8/gems/rack-1.0.0/lib/rack/showexceptions.rb:24:in
> `call'
> /usr/lib/ruby/gems/1.8/gems/rack-1.0.0/lib/rack/methodoverride.rb:24:in
> `call' /usr/lib/ruby/gems/1.8/gems/rack-1.0.0/lib/rack/commonlogger.rb:20:in
> `_call'
> /usr/lib/ruby/gems/1.8/gems/rack-1.0.0/lib/rack/commonlogger.rb:13:in `call'
> /usr/lib/ruby/gems/1.8/gems/sinatra-0.9.4/lib/sinatra/base.rb:898:in `call'
> /usr/lib/ruby/gems/1.8/gems/sinatra-0.9.4/lib/sinatra/base.rb:943:in
> `synchronize'
> /usr/lib/ruby/gems/1.8/gems/sinatra-0.9.4/lib/sinatra/base.rb:898:in `call'
> /usr/lib/ruby/gems/1.8/gems/rack-1.0.0/lib/rack/content_length.rb:13:in
> `call' /usr/lib/ruby/gems/1.8/gems/rack-1.0.0/lib/rack/chunked.rb:15:in
> `call' /usr/lib/ruby/gems/1.8/gems/thin-1.2.4/lib/thin/connection.rb:76:in
> `pre_process'
> /usr/lib/ruby/gems/1.8/gems/thin-1.2.4/lib/thin/connection.rb:74:in `catch'
> /usr/lib/ruby/gems/1.8/gems/thin-1.2.4/lib/thin/connection.rb:74:in
> `pre_process'
> /usr/lib/ruby/gems/1.8/gems/thin-1.2.4/lib/thin/connection.rb:57:in
> `process'
> /usr/lib/ruby/gems/1.8/gems/thin-1.2.4/lib/thin/connection.rb:42:in
> `receive_data'
> /usr/lib/ruby/gems/1.8/gems/eventmachine-0.12.8/lib/eventmachine.rb:242:in
> `run_machine'
> /usr/lib/ruby/gems/1.8/gems/eventmachine-0.12.8/lib/eventmachine.rb:242:in
> `run' /usr/lib/ruby/gems/1.8/gems/thin-1.2.4/lib/thin/backends/base.rb:57:in
> `start' /usr/lib/ruby/gems/1.8/gems/thin-1.2.4/lib/thin/server.rb:156:in
> `start'
> /usr/lib/ruby/gems/1.8/gems/rack-1.0.0/lib/rack/handler/thin.rb:14:in `run'
> /usr/lib/ruby/gems/1.8/gems/sinatra-0.9.4/lib/sinatra/base.rb:866:in `run!'
> /usr/lib/ruby/gems/1.8/gems/sinatra-0.9.4/lib/sinatra/main.rb:34
> /home/garym/one/lib/ruby/occi/OCCIServer.rb:434 172.31.1.102 - -
> [03/Oct/2009 14:33:33] "GET /network HTTP/1.1" 500 83287 0.0275 172.31.1.102
> - - [03/Oct/2009 14:34:34] "GET /network HTTP/1.1" 401 15 0.0005
> NoMethodError: undefined method `bytesize' for #
> /usr/lib/ruby/gems/1.8/gems/sinatra-0.9.4/lib/sinatra/base.rb:46:in `finish'
> /home/garym/one/lib/ruby/occi/VirtualNetworkPoolOCCI.rb:12:in `inject'
> /usr/lib/ruby/gems/1.8/gems/sinatra-0.9.4/lib/sinatra/base.rb:45:in `each'
> /usr/lib/ruby/gems/1.8/gems/sinatra-0.9.4/lib/sinatra/base.rb:45:in `inject'
> /usr/lib/ruby/gems/1.8/gems/sinatra-0.9.4/lib/sinatra/base.rb:45:in `finish'
> /usr/lib/ruby/gems/1.8/gems/sinatra-0.9.4/lib/sinatra/base.rb:378:in `call!'
> /usr/lib/ruby/gems/1.8/gems/sinatra-0.9.4/lib/sinatra/base.rb:364:in `call'
> /usr/lib/ruby/gems/1.8/gems/rack-1.0.0/lib/rack/showexceptions.rb:24:in
> `call'
> /usr/lib/ruby/gems/1.8/gems/rack-1.0.0/lib/rack/methodoverride.rb:24:in
> `call' /usr/lib/ruby/gems/1.8/gems/rack-1.0.0/lib/rack/commonlogger.rb:20:in
> `_call'
> /usr/lib/ruby/gems/1.8/gems/rack-1.0.0/lib/rack/commonlogger.rb:13:in `call'
> /usr/lib/ruby/gems/1.8/gems/sinatra-0.9.4/lib/sinatra/base.rb:898:in `call'
> /usr/lib/ruby/gems/1.8/gems/sinatra-0.9.4/lib/sinatra/base.rb:943:in
> `synchronize'
> /usr/lib/ruby/gems/1.8/gems/sinatra-0.9.4/lib/sinatra/base.rb:898:in `call'
> /usr/lib/ruby/gems/1.8/gems/rack-1.0.0/lib/rack/content_length.rb:13:in
> `call' /usr/lib/ruby/gems/1.8/gems/rack-1.0.0/lib/rack/chunked.rb:15:in
> `call' /usr/lib/ruby/gems/1.8/gems/thin-1.2.4/lib/thin/connection.rb:76:in
> `pre_process'
> /usr/lib/ruby/gems/1.8/gems/thin-1.2.4/lib/thin/connection.rb:74:in `catch'
> /usr/lib/ruby/gems/1.8/gems/thin-1.2.4/lib/thin/connection.rb:74:in
> `pre_process'
> /usr/lib/ruby/gems/1.8/gems/thin-1.2.4/lib/thin/connection.rb:57:in
> `process'
> /usr/lib/ruby/gems/1.8/gems/thin-1.2.4/lib/thin/connection.rb:42:in
> `receive_data'
> /usr/lib/ruby/gems/1.8/gems/eventmachine-0.12.8/lib/eventmachine.rb:242:in
> `run_machine'
> /usr/lib/ruby/gems/1.8/gems/eventmachine-0.12.8/lib/eventmachine.rb:242:in
> `run' /usr/lib/ruby/gems/1.8/gems/thin-1.2.4/lib/thin/backends/base.rb:57:in
> `start' /usr/lib/ruby/gems/1.8/gems/thin-1.2.4/lib/thin/server.rb:156:in
> `start'
> /usr/lib/ruby/gems/1.8/gems/rack-1.0.0/lib/rack/handler/thin.rb:14:in `run'
> /usr/lib/ruby/gems/1.8/gems/sinatra-0.9.4/lib/sinatra/base.rb:866:in `run!'
> /usr/lib/ruby/gems/1.8/gems/sinatra-0.9.4/lib/sinatra/main.rb:34
> /home/garym/one/lib/ruby/occi/OCCIServer.rb:434 172.31.1.102 - -
> [03/Oct/2009 14:34:34] "GET /network HTTP/1.1" 500 83311 0.0270 172.31.1.102
> - - [03/Oct/2009 19:21:37] "GET /network HTTP/1.1" 401 15 0.0002
> NoMethodError: undefined method `bytesize' for #
> /usr/lib/ruby/gems/1.8/gems/sinatra-0.9.4/lib/sinatra/base.rb:46:in `finish'
> /home/garym/one/lib/ruby/occi/VirtualNetworkPoolOCCI.rb:12:in `inject'
> /usr/lib/ruby/gems/1.8/gems/sinatra-0.9.4/lib/sinatra/base.rb:45:in `each'
> /usr/lib/ruby/gems/1.8/gems/sinatra-0.9.4/lib/sinatra/base.rb:45:in `inject'
> /usr/lib/ruby/gems/1.8/gems/sinatra-0.9.4/lib/sinatra/base.rb:45:in `finish'
> /usr/lib/ruby/gems/1.8/gems/sinatra-0.9.4/lib/sinatra/base.rb:378:in `call!'
> /usr/lib/ruby/gems/1.8/gems/sinatra-0.9.4/lib/sinatra/base.rb:364:in `call'
> /usr/lib/ruby/gems/1.8/gems/rack-1.0.0/lib/rack/showexceptions.rb:24:in
> `call'
> /usr/lib/ruby/gems/1.8/gems/rack-1.0.0/lib/rack/methodoverride.rb:24:in
> `call' /usr/lib/ruby/gems/1.8/gems/rack-1.0.0/lib/rack/commonlogger.rb:20:in
> `_call'
> /usr/lib/ruby/gems/1.8/gems/rack-1.0.0/lib/rack/commonlogger.rb:13:in `call'
> /usr/lib/ruby/gems/1.8/gems/sinatra-0.9.4/lib/sinatra/base.rb:898:in `call'
> /usr/lib/ruby/gems/1.8/gems/sinatra-0.9.4/lib/sinatra/base.rb:943:in
> `synchronize'
> /usr/lib/ruby/gems/1.8/gems/sinatra-0.9.4/lib/sinatra/base.rb:898:in `call'
> /usr/lib/ruby/gems/1.8/gems/rack-1.0.0/lib/rack/content_length.rb:13:in
> `call' /usr/lib/ruby/gems/1.8/gems/rack-1.0.0/lib/rack/chunked.rb:15:in
> `call' /usr/lib/ruby/gems/1.8/gems/thin-1.2.4/lib/thin/connection.rb:76:in
> `pre_process'
> /usr/lib/ruby/gems/1.8/gems/thin-1.2.4/lib/thin/connection.rb:74:in `catch'
> /usr/lib/ruby/gems/1.8/gems/thin-1.2.4/lib/thin/connection.rb:74:in
> `pre_process'
> /usr/lib/ruby/gems/1.8/gems/thin-1.2.4/lib/thin/connection.rb:57:in
> `process'
> /usr/lib/ruby/gems/1.8/gems/thin-1.2.4/lib/thin/connection.rb:42:in
> `receive_data'
> /usr/lib/ruby/gems/1.8/gems/eventmachine-0.12.8/lib/eventmachine.rb:242:in
> `run_machine'
> /usr/lib/ruby/gems/1.8/gems/eventmachine-0.12.8/lib/eventmachine.rb:242:in
> `run' /usr/lib/ruby/gems/1.8/gems/thin-1.2.4/lib/thin/backends/base.rb:57:in
> `start' /usr/lib/ruby/gems/1.8/gems/thin-1.2.4/lib/thin/server.rb:156:in
> `start'
> /usr/lib/ruby/gems/1.8/gems/rack-1.0.0/lib/rack/handler/thin.rb:14:in `run'
> /usr/lib/ruby/gems/1.8/gems/sinatra-0.9.4/lib/sinatra/base.rb:866:in `run!'
> /usr/lib/ruby/gems/1.8/gems/sinatra-0.9.4/lib/sinatra/main.rb:34
> /home/garym/one/lib/ruby/occi/OCCIServer.rb:434 172.31.1.102 - -
> [03/Oct/2009 19:21:37] "GET /network HTTP/1.1" 500 83311 0.0270 Client
> Output: NoMethodError at /network
>
> NoMethodError at /network
>
> undefined method `bytesize' for #<OpenNebula::Error:0xb6fcf9ac>
>
> file: base.rb
> location: finish
> line: 46
>
> BACKTRACE
>
> (expand)
>
> JUMP TO: GET POST COOKIES ENV
>
> /usr/lib/ruby/gems/1.8/gems/sinatra-0.9.4/lib/sinatra/base.rb in finish
>
> header.delete "Content-Type"
> [status.to_i, header.to_hash, []]
> else
> body = @body || []
> body = [body] if body.respond_to? :to_str
> if body.respond_to?(:to_ary)
> header["Content-Length"] = body.to_ary.
>
> inject(0) { |len, part| len + part.bytesize }.to_s
>
> end
> [status.to_i, header.to_hash, body]
> end
> end
> end
> class NotFound < NameError #:nodoc:
>
> /home/garym/one/lib/ruby/occi/VirtualNetworkPoolOCCI.rb in inject
>
> class VirtualNetworkPoolOCCI < VirtualNetworkPool
> # Creates the VMI representation of a Virtual Network
> def to_occi(base_url)
> network_pool_hash=Crack::XML.parse(to_xml)
> occi_xml = "<NETWORK>"
>
> network_pool_hash['VNET_POOL']['VNET'].each{|network|
>
> occi_xml+='<NIC id="' + network['ID'].strip + '"' +
> ' href="' + base_url + '/network/' + network['ID'].strip + '"/>'
> }
> occi_xml += "</NETWORK>"
> end
> end
>
> /usr/lib/ruby/gems/1.8/gems/sinatra-0.9.4/lib/sinatra/base.rb in each
>
> if [204, 304].include?(status.to_i)
> header.delete "Content-Type"
> [status.to_i, header.to_hash, []]
> else
> body = @body || []
> body = [body] if body.respond_to? :to_str
> if body.respond_to?(:to_ary)
>
> header["Content-Length"] = body.to_ary.
>
> inject(0) { |len, part| len + part.bytesize }.to_s
> end
> [status.to_i, header.to_hash, body]
> end
> end
> end
>
> /usr/lib/ruby/gems/1.8/gems/sinatra-0.9.4/lib/sinatra/base.rb in inject
>
> if [204, 304].include?(status.to_i)
> header.delete "Content-Type"
> [status.to_i, header.to_hash, []]
> else
> body = @body || []
> body = [body] if body.respond_to? :to_str
> if body.respond_to?(:to_ary)
>
> header["Content-Length"] = body.to_ary.
>
> inject(0) { |len, part| len + part.bytesize }.to_s
> end
> [status.to_i, header.to_hash, body]
> end
> end
> end
>
> /usr/lib/ruby/gems/1.8/gems/sinatra-0.9.4/lib/sinatra/base.rb in finish
>
> if [204, 304].include?(status.to_i)
> header.delete "Content-Type"
> [status.to_i, header.to_hash, []]
> else
> body = @body || []
> body = [body] if body.respond_to? :to_str
> if body.respond_to?(:to_ary)
>
> header["Content-Length"] = body.to_ary.
>
> inject(0) { |len, part| len + part.bytesize }.to_s
> end
> [status.to_i, header.to_hash, body]
> end
> end
> end
>
> /usr/lib/ruby/gems/1.8/gems/sinatra-0.9.4/lib/sinatra/base.rb in call!
>
> @request = Request.new(env)
> @response = Response.new
> @params = nil
> invoke { dispatch! }
> invoke { error_block!(response.status) }
>
> status, header, body = @response.finish
>
> # Never produce a body on HEAD requests. Do retain the Content-Length
> # unless it's "0", in which case we assume it was calculated erroneously
> # for a manual HEAD response and remove it entirely.
> if @env['REQUEST_METHOD'] == 'HEAD'
> body = []
> header.delete('Content-Length') if header['Content-Length'] == '0'
>
> /usr/lib/ruby/gems/1.8/gems/sinatra-0.9.4/lib/sinatra/base.rb in call
>
> def initialize(app=nil)
> @app = app
> yield self if block_given?
> end
> # Rack call interface.
> def call(env)
>
> dup.call!(env)
>
> end
> attr_accessor :env, :request, :response, :params
> def call!(env)
> @env = env
> @request = Request.new(env)
>
> /usr/lib/ruby/gems/1.8/gems/rack-1.0.0/lib/rack/showexceptions.rb in call
>
> def initialize(app)
> @app = app
> @template = ERB.new(TEMPLATE)
> end
> def call(env)
>
> @app.call(env)
>
> rescue StandardError, LoadError, SyntaxError => e
> backtrace = pretty(env, e)
> [500,
> {"Content-Type" => "text/html",
> "Content-Length" => backtrace.join.size.to_s},
> backtrace]
> end
>
> /usr/lib/ruby/gems/1.8/gems/rack-1.0.0/lib/rack/methodoverride.rb in call
>
> method = method.to_s.upcase
> if HTTP_METHODS.include?(method)
> env["rack.methodoverride.original_method"] = env["REQUEST_METHOD"]
> env["REQUEST_METHOD"] = method
> end
> end
>
> @app.call(env)
>
> end
> end
> end
>
> /usr/lib/ruby/gems/1.8/gems/rack-1.0.0/lib/rack/commonlogger.rb in _call
>
> dup._call(env)
> end
> def _call(env)
> @env = env
> @logger ||= self
> @time = Time.now
>
> @status, @header, @body = @app.call(env)
>
> [@status, @header, self]
> end
> def close
> @body.close if @body.respond_to? :close
> end
>
> /usr/lib/ruby/gems/1.8/gems/rack-1.0.0/lib/rack/commonlogger.rb in call
>
> class CommonLogger
> def initialize(app, logger=nil)
> @app = app
> @logger = logger
> end
> def call(env)
>
> dup._call(env)
>
> end
> def _call(env)
> @env = env
> @logger ||= self
> @time = Time.now
> @status, @header, @body = @app.call(env)
>
> /usr/lib/ruby/gems/1.8/gems/sinatra-0.9.4/lib/sinatra/base.rb in call
>
> @middleware.each { |c,a,b| builder.use(c, *a, &b) }
> builder.run super
> builder.to_app
> end
> def call(env)
>
> synchronize { prototype.call(env) }
>
> end
> def reset!(base=superclass)
> @routes = base.dupe_routes
> @templates = base.templates.dup
> @conditions = []
> @filters = base.filters.dup
>
> /usr/lib/ruby/gems/1.8/gems/sinatra-0.9.4/lib/sinatra/base.rb in synchronize
>
> end
> @@mutex = Mutex.new
> def synchronize(&block)
> if lock?
> @@mutex.synchronize(&block)
> else
>
> yield
>
> end
> end
> def metadef(message, &block)
> (class << self; self; end).
> send :define_method, message, &block
> end
>
> /usr/lib/ruby/gems/1.8/gems/sinatra-0.9.4/lib/sinatra/base.rb in call
>
> @middleware.each { |c,a,b| builder.use(c, *a, &b) }
> builder.run super
> builder.to_app
> end
> def call(env)
>
> synchronize { prototype.call(env) }
>
> end
> def reset!(base=superclass)
> @routes = base.dupe_routes
> @templates = base.templates.dup
> @conditions = []
> @filters = base.filters.dup
>
> /usr/lib/ruby/gems/1.8/gems/rack-1.0.0/lib/rack/content_length.rb in call
>
> include Rack::Utils
> def initialize(app)
> @app = app
> end
> def call(env)
>
> status, headers, body = @app.call(env)
>
> headers = HeaderHash.new(headers)
> if !STATUS_WITH_NO_ENTITY_BODY.include?(status) &&
> !headers['Content-Length'] &&
> !headers['Transfer-Encoding'] &&
> (body.respond_to?(:to_ary) || body.respond_to?(:to_str))
>
> /usr/lib/ruby/gems/1.8/gems/rack-1.0.0/lib/rack/chunked.rb in call
>
> include Rack::Utils
> def initialize(app)
> @app = app
> end
> def call(env)
>
> status, headers, body = @app.call(env)
>
> headers = HeaderHash.new(headers)
> if env['HTTP_VERSION'] == 'HTTP/1.0' ||
> STATUS_WITH_NO_ENTITY_BODY.include?(status) ||
> headers['Content-Length'] ||
> headers['Transfer-Encoding']
> [status, headers.to_hash, body]
>
> /usr/lib/ruby/gems/1.8/gems/thin-1.2.4/lib/thin/connection.rb in pre_process
>
> # When we're under a non-async framework like rails, we can still spawn
> # off async responses using the callback info, so there's little point
> # in removing this.
> response = AsyncResponse
> catch(:async) do
> # Process the request calling the Rack adapter
>
> response = @app.call(@request.env)
>
> end
> response
> rescue Exception
> handle_error
> terminate_request
> nil # Signal to post_process that the request could not be processed
> end
>
> /usr/lib/ruby/gems/1.8/gems/thin-1.2.4/lib/thin/connection.rb in catch
>
> # callback is no longer referenced, so be tidy!
> @request.async_callback = method(:post_process)
> # When we're under a non-async framework like rails, we can still spawn
> # off async responses using the callback info, so there's little point
> # in removing this.
> response = AsyncResponse
>
> catch(:async) do
>
> # Process the request calling the Rack adapter
> response = @app.call(@request.env)
> end
> response
> rescue Exception
> handle_error
> terminate_request
>
> /usr/lib/ruby/gems/1.8/gems/thin-1.2.4/lib/thin/connection.rb in pre_process
>
> # callback is no longer referenced, so be tidy!
> @request.async_callback = method(:post_process)
> # When we're under a non-async framework like rails, we can still spawn
> # off async responses using the callback info, so there's little point
> # in removing this.
> response = AsyncResponse
>
> catch(:async) do
>
> # Process the request calling the Rack adapter
> response = @app.call(@request.env)
> end
> response
> rescue Exception
> handle_error
> terminate_request
>
> /usr/lib/ruby/gems/1.8/gems/thin-1.2.4/lib/thin/connection.rb in process
>
> # is ready to be processed.
> def process
> if threaded?
> @request.threaded = true
> EventMachine.defer(method(:pre_process), method(:post_process))
> else
> @request.threaded = false
>
> post_process(pre_process)
>
> end
> end
> def pre_process
> # Add client info to the request env
> @request.remote_address = remote_address
>
> /usr/lib/ruby/gems/1.8/gems/thin-1.2.4/lib/thin/connection.rb in
> receive_data
>
> @request = Request.new
> @response = Response.new
> end
> # Called when data is received from the client.
> def receive_data(data)
> trace { data }
>
> process if @request.parse(data)
>
> rescue InvalidRequest => e
> log "!! Invalid request"
> log_error e
> close_connection
> end
> # Called when all data was received and the request
>
> /usr/lib/ruby/gems/1.8/gems/eventmachine-0.12.8/lib/eventmachine.rb in
> run_machine
>
> @reactor_running = true
> initialize_event_machine
> (b = blk || block) and add_timer(0, b)
> if @next_tick_queue && !@next_tick_queue.empty?
> add_timer(0) { signal_loopbreak }
> end
> @reactor_thread = Thread.current
>
> run_machine
>
> ensure
> begin
> release_machine
> ensure
> if @threadpool
> @threadpool.each { |t| t.exit }
> @threadpool.each { |t| t.kill! if t.alive? }
>
> /usr/lib/ruby/gems/1.8/gems/eventmachine-0.12.8/lib/eventmachine.rb in run
>
> @reactor_running = true
> initialize_event_machine
> (b = blk || block) and add_timer(0, b)
> if @next_tick_queue && !@next_tick_queue.empty?
> add_timer(0) { signal_loopbreak }
> end
> @reactor_thread = Thread.current
>
> run_machine
>
> ensure
> begin
> release_machine
> ensure
> if @threadpool
> @threadpool.each { |t| t.exit }
> @threadpool.each { |t| t.kill! if t.alive? }
>
> /usr/lib/ruby/gems/1.8/gems/thin-1.2.4/lib/thin/backends/base.rb in start
>
> @running = true
> end
> # Allow for early run up of eventmachine.
> if EventMachine.reactor_running?
> starter.call
> else
>
> EventMachine.run(&starter)
>
> end
> end
> # Stop of the backend from accepting new connections.
> def stop
> @running = false
> @stopping = true
>
> /usr/lib/ruby/gems/1.8/gems/thin-1.2.4/lib/thin/server.rb in start
>
> log ">> Thin web server (v#{VERSION::STRING} codename #{VERSION::CODENAME})"
> debug ">> Debugging ON"
> trace ">> Tracing ON"
> log ">> Maximum connections set to #{@backend.maximum_connections}"
> log ">> Listening on #{@backend}, CTRL+C to stop"
>
> @backend.start
>
> end
> alias :start! :start
> # == Gracefull shutdown
> # Stops the server after processing all current connections.
> # As soon as this method is called, the server stops accepting
> # new requests and wait for all current connections to finish.
>
> /usr/lib/ruby/gems/1.8/gems/rack-1.0.0/lib/rack/handler/thin.rb in run
>
> class Thin
> def self.run(app, options={})
> app = Rack::Chunked.new(Rack::ContentLength.new(app))
> server = ::Thin::Server.new(options[:Host] || '0.0.0.0',
> options[:Port] || 8080,
> app)
> yield server if block_given?
>
> server.start
>
> end
> end
> end
> end
>
> /usr/lib/ruby/gems/1.8/gems/sinatra-0.9.4/lib/sinatra/base.rb in run!
>
> # Thin, Mongrel or WEBrick (in that order)
> def run!(options={})
> set options
> handler = detect_rack_handler
> handler_name = handler.name.gsub(/.*::/, '')
> puts "== Sinatra/#{Sinatra::VERSION} has taken the stage " +
> "on #{port} for #{environment} with backup from #{handler_name}" unless
> handler_name =~/cgi/i
>
> handler.run self, :Host => host, :Port => port do |server|
>
> trap(:INT) do
> ## Use thins' hard #stop! if available, otherwise just #stop
> server.respond_to?(:stop!) ? server.stop! : server.stop
> puts "\n== Sinatra has ended his set (crowd applauds)" unless handler_name
> =~/cgi/i
> end
> end
> rescue Errno::EADDRINUSE => e
>
> /usr/lib/ruby/gems/1.8/gems/sinatra-0.9.4/lib/sinatra/main.rb in nil
>
> def mime(ext, type)
> ext = ".#{ext}" unless ext.to_s[0] == ?.
> Rack::Mime::MIME_TYPES[ext.to_s] = type
> end
> at_exit do
> raise $! if $!
>
> Sinatra::Application.run! if Sinatra::Application.run?
>
> end
>
> /home/garym/one/lib/ruby/occi/OCCIServer.rb in nil
>
> "</DISK>"
> else
> status 404
> "Disk with id = \"" + params[:id] + "\" not found"
> end
> end
>
> delete '/storage/:id' do
>
> protected!
> "Not yet implemented"
> end
>
> GET
>
> No GET data.
>
> POST
>
> No POST data.
>
> COOKIES
>
> No cookie data.
>
> Rack ENV
>
> Variable Value
> GATEWAY_INTERFACE
> CGI/1.2
> HTTP_ACCEPT
> */*
> HTTP_AUTHORIZATION
> Basic bWFyaWE6ZTIxZmM1NmMxYTI3MmI2MzBlMGQxNDM5MDc5ZDA1OThjZjhiODMyOQ==
> HTTP_HOST
> cloud.exxia.com:4567
> HTTP_VERSION
> HTTP/1.1
> PATH_INFO
> /network
> QUERY_STRING
> REMOTE_ADDR
> 172.31.1.102
> REQUEST_METHOD
> GET
> REQUEST_PATH
> /network
> REQUEST_URI
> /network
> SCRIPT_NAME
> SERVER_NAME
> cloud.exxia.com
> SERVER_PORT
> 4567
> SERVER_PROTOCOL
> HTTP/1.1
> SERVER_SOFTWARE
> thin 1.2.4 codename Flaming Astroboy
> async.callback
> #<Method: Thin::Connection#post_process>
> async.close
> #<EventMachine::DefaultDeferrable:0xb7045e18>
> rack.errors
> #<IO:0xb7ef4f54>
> rack.input
> #<StringIO:0xb7046048>
> rack.multiprocess
> false
> rack.multithread
> false
> rack.request
> #<Rack::Request:0xb6fcf894 @env={"SERVER_NAME"=>"cloud.exxia.com",
> "async.callback"=>#<Method: Thin::Connection#post_process>,
> "rack.url_scheme"=>"http", "PATH_INFO"=>"/network", "rack.run_once"=>false,
> "rack.input"=>#<StringIO:0xb7046048>,
> "rack.request"=>#<Rack::Request:0xb6fcf894 ...>, "SCRIPT_NAME"=>"",
> "SERVER_PROTOCOL"=>"HTTP/1.1", "HTTP_HOST"=>"cloud.exxia.com:4567",
> "HTTP_AUTHORIZATION"=>"Basic
> bWFyaWE6ZTIxZmM1NmMxYTI3MmI2MzBlMGQxNDM5MDc5ZDA1OThjZjhiODMyOQ==",
> "rack.errors"=>#<IO:0xb7ef4f54>, "REMOTE_ADDR"=>"172.31.1.102",
> "REQUEST_PATH"=>"/network", "SERVER_SOFTWARE"=>"thin 1.2.4 codename Flaming
> Astroboy", "rack.request.form_input"=>#<StringIO:0xb7046048>,
> "rack.request.query_hash"=>{}, "HTTP_VERSION"=>"HTTP/1.1",
> "rack.multithread"=>false, "rack.version"=>[1, 0],
> "rack.request.form_vars"=>"",
> "async.close"=>#<EventMachine::DefaultDeferrable:0xb7045e18>,
> "REQUEST_URI"=>"/network", "rack.multiprocess"=>false,
> "SERVER_PORT"=>"4567", "rack.request.form_hash"=>{},
> "rack.request.query_string"=>"", "QUERY_STRING"=>"",
> "GATEWAY_INTERFACE"=>"CGI/1.2", "HTTP_ACCEPT"=>"*/*",
> "REQUEST_METHOD"=>"GET"}>
> rack.request.form_hash
> {}
> rack.request.form_input
> #<StringIO:0xb7046048>
> rack.request.form_vars
> rack.request.query_hash
> {}
> rack.request.query_string
> rack.run_once
> false
> rack.url_scheme
> http
> rack.version
> [1, 0]
>
> You're seeing this error because you use you have enabled the
> show_exceptions option.
>
> _______________________________________________ Users mailing list
> Users at lists.opennebula.org
> http://lists.opennebula.org/listinfo.cgi/users-opennebula.org



-- 
---
Sebastien Goasguen
School of Computing
Clemson University
864-553-4734
http://runseb.googlepages.com



More information about the Users mailing list