[one-users] What is this error in the occi-server >> dumping code to client ?
Gary Mazz
garymazzaferro at gmail.com
Sat Oct 3 18:53:18 PDT 2009
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
#<OpenNebula::Error:0xb7ac0c6c>
/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
#<OpenNebula::Error:0xb700d194>
/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
#<OpenNebula::Error:0xb6f5a314>
/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
#<OpenNebula::Error:0xb700e3c8>
/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
#<OpenNebula::Error:0xb6f8148c>
/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
#<OpenNebula::Error:0xb6fb6524>
/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
#<OpenNebula::Error:0xb6fcf9ac>
/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:
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<title>NoMethodError at /network</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(){
var bt = document.getElementById("backtrace");
var toggler = document.getElementById("expando");
if (bt.className == 'condensed') {
bt.className = 'expanded';
toggler.innerHTML = "(condense)";
} else {
bt.className = 'condensed';
toggler.innerHTML = "(expand)";
}
}
//-->
</script>
<style type="text/css" media="screen">
* {margin: 0; padding: 0; border: 0; outline: 0;}
div.clear {clear: both;}
body {background: #EEEEEE; margin: 0; padding: 0;
font-family: 'Lucida Grande', 'Lucida Sans Unicode',
'Garuda';}
code {font-family: 'Lucida Console', monospace;
font-size: 12px;}
li {height: 18px;}
ul {list-style: none; margin: 0; padding: 0;}
ol:hover {cursor: pointer;}
ol li {white-space: pre;}
#explanation {font-size: 12px; color: #666666;
margin: 20px 0 0 100px;}
/* WRAP */
#wrap {width: 860px; background: #FFFFFF; margin: 0 auto;
padding: 30px 50px 20px 50px;
border-left: 1px solid #DDDDDD;
border-right: 1px solid #DDDDDD;}
/* HEADER */
#header {margin: 0 auto 25px auto;}
#header img {float: left;}
#header #summary {float: left; margin: 12px 0 0 20px; width:520px;
font-family: 'Lucida Grande', 'Lucida Sans Unicode';}
h1 {margin: 0; font-size: 36px; color: #981919;}
h2 {margin: 0; font-size: 22px; color: #333333;}
#header ul {margin: 0; font-size: 12px; color: #666666;}
#header ul li strong{color: #444444;}
#header ul li {display: inline; padding: 0 10px;}
#header ul li.first {padding-left: 0;}
#header ul li.last {border: 0; padding-right: 0;}
/* BODY */
#backtrace,
#get,
#post,
#cookies,
#rack {width: 860px; margin: 0 auto 10px auto;}
p#nav {float: right; font-size: 14px;}
/* BACKTRACE */
a#expando {float: left; padding-left: 5px; color: #666666;
font-size: 14px; text-decoration: none; cursor:
pointer;}
a#expando:hover {text-decoration: underline;}
h3 {float: left; width: 100px; margin-bottom: 10px;
color: #981919; font-size: 14px; font-weight: bold;}
#nav a {color: #666666; text-decoration: none; padding: 0
5px;}
#backtrace li.frame-info {background: #f7f7f7; padding-left: 10px;
font-size: 12px; color: #333333;}
#backtrace ul {list-style-position: outside; border: 1px solid
#E9E9E9;
border-bottom: 0;}
#backtrace ol {width: 808px; margin-left: 50px;
font: 10px 'Lucida Console', monospace; color:
#666666;}
#backtrace ol li {border: 0; border-left: 1px solid #E9E9E9;
padding: 2px 0;}
#backtrace ol code {font-size: 10px; color: #555555; padding-left: 5px;}
#backtrace-ul li {border-bottom: 1px solid #E9E9E9; height: auto;
padding: 3px 0;}
#backtrace-ul .code {padding: 6px 0 4px 0;}
#backtrace.condensed .system,
#backtrace.condensed .framework {display:none;}
/* REQUEST DATA */
p.no-data {padding-top: 2px; font-size: 12px; color: #666666;}
table.req {width: 760px; text-align: left; font-size: 12px;
color: #666666; padding: 0; border-spacing: 0;
border: 1px solid #EEEEEE; border-bottom: 0;
border-left: 0;}
table.req tr th {padding: 2px 10px; font-weight: bold;
background: #F7F7F7; border-bottom: 1px solid
#EEEEEE;
border-left: 1px solid #EEEEEE;}
table.req tr td {padding: 2px 20px 2px 10px;
border-bottom: 1px solid #EEEEEE;
border-left: 1px solid #EEEEEE;}
/* HIDE PRE/POST CODE AT START */
.pre-context,
.post-context {display: none;}
</style>
</head>
<body>
<div id="wrap">
<div id="header">
<img src="/__sinatra__/500.png" alt="application error" />
<div id="summary">
<h1><strong>NoMethodError</strong> at <strong>/network
</strong></h1>
<h2>undefined method `bytesize' for
#<OpenNebula::Error:0xb6fcf9ac></h2>
<ul>
<li class="first"><strong>file:</strong> <code>
base.rb</code></li>
<li><strong>location:</strong> <code>finish
</code></li>
<li class="last"><strong>line:
</strong> 46</li>
</ul>
</div>
<div class="clear"></div>
</div>
<div id="backtrace" class='condensed'>
<h3>BACKTRACE</h3>
<p><a href="#" id="expando"
onclick="toggleBacktrace(); return false">(expand)</a></p>
<p id="nav"><strong>JUMP TO:</strong>
<a href="#get-info">GET</a>
<a href="#post-info">POST</a>
<a href="#cookie-info">COOKIES</a>
<a href="#env-info">ENV</a>
</p>
<div class="clear"></div>
<ul id="backtrace-ul">
<li class="frame-info framework">
<code>/usr/lib/ruby/gems/1.8/gems/sinatra-0.9.4/lib/sinatra/base.rb</code>
in
<code><strong>finish</strong></code>
</li>
<li class="code framework">
<ol start="39"
class="pre-context" id="pre-1"
onclick="toggle(1);">
<li class="pre-context-line"><code> header.delete
"Content-Type"
</code></li>
<li class="pre-context-line"><code> [status.to_i,
header.to_hash, []]
</code></li>
<li class="pre-context-line"><code> else
</code></li>
<li class="pre-context-line"><code> body = @body
|| []
</code></li>
<li class="pre-context-line"><code> body = [body]
if body.respond_to? :to_str
</code></li>
<li class="pre-context-line"><code> if
body.respond_to?(:to_ary)
</code></li>
<li class="pre-context-line"><code>
header["Content-Length"] = body.to_ary.
</code></li>
</ol>
<ol start="46" class="context" id="1"
onclick="toggle(1);">
<li class="context-line"
id="context-1"><code> inject(0) { |len, part| len +
part.bytesize }.to_s</code></li>
</ol>
<ol start="47" class="post-context"
id="post-1" onclick="toggle(1);">
<li class="post-context-line"><code> end
</code></li>
<li class="post-context-line"><code>
[status.to_i, header.to_hash, body]
</code></li>
<li class="post-context-line"><code> end
</code></li>
<li class="post-context-line"><code> end
</code></li>
<li class="post-context-line"><code> end
</code></li>
<li class="post-context-line"><code>
</code></li>
<li class="post-context-line"><code> class NotFound
< NameError #:nodoc:
</code></li>
</ol>
<div class="clear"></div>
</li>
<li class="frame-info app">
<code>/home/garym/one/lib/ruby/occi/VirtualNetworkPoolOCCI.rb</code> in
<code><strong>inject</strong></code>
</li>
<li class="code app">
<ol start="5"
class="pre-context" id="pre-2"
onclick="toggle(2);">
<li class="pre-context-line"><code>
</code></li>
<li class="pre-context-line"><code>class
VirtualNetworkPoolOCCI < VirtualNetworkPool
</code></li>
<li class="pre-context-line"><code> # Creates the VMI
representation of a Virtual Network
</code></li>
<li class="pre-context-line"><code> def to_occi(base_url)
</code></li>
<li class="pre-context-line"><code>
network_pool_hash=Crack::XML.parse(to_xml)
</code></li>
<li class="pre-context-line"><code> occi_xml =
"<NETWORK>"
</code></li>
<li class="pre-context-line"><code>
</code></li>
</ol>
<ol start="12" class="context" id="2"
onclick="toggle(2);">
<li class="context-line" id="context-2"><code>
network_pool_hash['VNET_POOL']['VNET'].each{|network|</code></li>
</ol>
<ol start="13" class="post-context"
id="post-2" onclick="toggle(2);">
<li class="post-context-line"><code>
occi_xml+='<NIC id="' + network['ID'].strip +
'"' +
</code></li>
<li
class="post-context-line"><code> '
href="' + base_url + '/network/' +
network['ID'].strip + '"/>'
</code></li>
<li class="post-context-line"><code> }
</code></li>
<li class="post-context-line"><code>
</code></li>
<li class="post-context-line"><code> occi_xml +=
"</NETWORK>"
</code></li>
<li class="post-context-line"><code> end
</code></li>
<li class="post-context-line"><code>end
</code></li>
</ol>
<div class="clear"></div>
</li>
<li class="frame-info framework">
<code>/usr/lib/ruby/gems/1.8/gems/sinatra-0.9.4/lib/sinatra/base.rb</code>
in
<code><strong>each</strong></code>
</li>
<li class="code framework">
<ol start="38"
class="pre-context" id="pre-3"
onclick="toggle(3);">
<li class="pre-context-line"><code> if [204,
304].include?(status.to_i)
</code></li>
<li class="pre-context-line"><code> header.delete
"Content-Type"
</code></li>
<li class="pre-context-line"><code> [status.to_i,
header.to_hash, []]
</code></li>
<li class="pre-context-line"><code> else
</code></li>
<li class="pre-context-line"><code> body = @body
|| []
</code></li>
<li class="pre-context-line"><code> body = [body]
if body.respond_to? :to_str
</code></li>
<li class="pre-context-line"><code> if
body.respond_to?(:to_ary)
</code></li>
</ol>
<ol start="45" class="context" id="3"
onclick="toggle(3);">
<li class="context-line" id="context-3"><code>
header["Content-Length"] = body.to_ary.</code></li>
</ol>
<ol start="46" class="post-context"
id="post-3" onclick="toggle(3);">
<li class="post-context-line"><code>
inject(0) { |len, part| len + part.bytesize }.to_s
</code></li>
<li class="post-context-line"><code> end
</code></li>
<li class="post-context-line"><code>
[status.to_i, header.to_hash, body]
</code></li>
<li class="post-context-line"><code> end
</code></li>
<li class="post-context-line"><code> end
</code></li>
<li class="post-context-line"><code> end
</code></li>
<li class="post-context-line"><code>
</code></li>
</ol>
<div class="clear"></div>
</li>
<li class="frame-info framework">
<code>/usr/lib/ruby/gems/1.8/gems/sinatra-0.9.4/lib/sinatra/base.rb</code>
in
<code><strong>inject</strong></code>
</li>
<li class="code framework">
<ol start="38"
class="pre-context" id="pre-4"
onclick="toggle(4);">
<li class="pre-context-line"><code> if [204,
304].include?(status.to_i)
</code></li>
<li class="pre-context-line"><code> header.delete
"Content-Type"
</code></li>
<li class="pre-context-line"><code> [status.to_i,
header.to_hash, []]
</code></li>
<li class="pre-context-line"><code> else
</code></li>
<li class="pre-context-line"><code> body = @body
|| []
</code></li>
<li class="pre-context-line"><code> body = [body]
if body.respond_to? :to_str
</code></li>
<li class="pre-context-line"><code> if
body.respond_to?(:to_ary)
</code></li>
</ol>
<ol start="45" class="context" id="4"
onclick="toggle(4);">
<li class="context-line" id="context-4"><code>
header["Content-Length"] = body.to_ary.</code></li>
</ol>
<ol start="46" class="post-context"
id="post-4" onclick="toggle(4);">
<li class="post-context-line"><code>
inject(0) { |len, part| len + part.bytesize }.to_s
</code></li>
<li class="post-context-line"><code> end
</code></li>
<li class="post-context-line"><code>
[status.to_i, header.to_hash, body]
</code></li>
<li class="post-context-line"><code> end
</code></li>
<li class="post-context-line"><code> end
</code></li>
<li class="post-context-line"><code> end
</code></li>
<li class="post-context-line"><code>
</code></li>
</ol>
<div class="clear"></div>
</li>
<li class="frame-info framework">
<code>/usr/lib/ruby/gems/1.8/gems/sinatra-0.9.4/lib/sinatra/base.rb</code>
in
<code><strong>finish</strong></code>
</li>
<li class="code framework">
<ol start="38"
class="pre-context" id="pre-5"
onclick="toggle(5);">
<li class="pre-context-line"><code> if [204,
304].include?(status.to_i)
</code></li>
<li class="pre-context-line"><code> header.delete
"Content-Type"
</code></li>
<li class="pre-context-line"><code> [status.to_i,
header.to_hash, []]
</code></li>
<li class="pre-context-line"><code> else
</code></li>
<li class="pre-context-line"><code> body = @body
|| []
</code></li>
<li class="pre-context-line"><code> body = [body]
if body.respond_to? :to_str
</code></li>
<li class="pre-context-line"><code> if
body.respond_to?(:to_ary)
</code></li>
</ol>
<ol start="45" class="context" id="5"
onclick="toggle(5);">
<li class="context-line" id="context-5"><code>
header["Content-Length"] = body.to_ary.</code></li>
</ol>
<ol start="46" class="post-context"
id="post-5" onclick="toggle(5);">
<li class="post-context-line"><code>
inject(0) { |len, part| len + part.bytesize }.to_s
</code></li>
<li class="post-context-line"><code> end
</code></li>
<li class="post-context-line"><code>
[status.to_i, header.to_hash, body]
</code></li>
<li class="post-context-line"><code> end
</code></li>
<li class="post-context-line"><code> end
</code></li>
<li class="post-context-line"><code> end
</code></li>
<li class="post-context-line"><code>
</code></li>
</ol>
<div class="clear"></div>
</li>
<li class="frame-info framework">
<code>/usr/lib/ruby/gems/1.8/gems/sinatra-0.9.4/lib/sinatra/base.rb</code>
in
<code><strong>call!</strong></code>
</li>
<li class="code framework">
<ol start="371"
class="pre-context" id="pre-6"
onclick="toggle(6);">
<li class="pre-context-line"><code> @request =
Request.new(env)
</code></li>
<li class="pre-context-line"><code> @response =
Response.new
</code></li>
<li class="pre-context-line"><code> @params = nil
</code></li>
<li class="pre-context-line"><code>
</code></li>
<li class="pre-context-line"><code> invoke {
dispatch! }
</code></li>
<li class="pre-context-line"><code> invoke {
error_block!(response.status) }
</code></li>
<li class="pre-context-line"><code>
</code></li>
</ol>
<ol start="378" class="context" id="6"
onclick="toggle(6);">
<li class="context-line" id="context-6"><code>
status, header, body = @response.finish</code></li>
</ol>
<ol start="379" class="post-context"
id="post-6" onclick="toggle(6);">
<li class="post-context-line"><code>
</code></li>
<li class="post-context-line"><code> # Never
produce a body on HEAD requests. Do retain the Content-Length
</code></li>
<li class="post-context-line"><code> # unless
it's "0", in which case we assume it was calculated
erroneously
</code></li>
<li class="post-context-line"><code> # for a manual
HEAD response and remove it entirely.
</code></li>
<li class="post-context-line"><code> if
@env['REQUEST_METHOD'] == 'HEAD'
</code></li>
<li class="post-context-line"><code> body = []
</code></li>
<li class="post-context-line"><code>
header.delete('Content-Length') if
header['Content-Length'] == '0'
</code></li>
</ol>
<div class="clear"></div>
</li>
<li class="frame-info framework">
<code>/usr/lib/ruby/gems/1.8/gems/sinatra-0.9.4/lib/sinatra/base.rb</code>
in
<code><strong>call</strong></code>
</li>
<li class="code framework">
<ol start="357"
class="pre-context" id="pre-7"
onclick="toggle(7);">
<li class="pre-context-line"><code> def
initialize(app=nil)
</code></li>
<li class="pre-context-line"><code> @app = app
</code></li>
<li class="pre-context-line"><code> yield self if
block_given?
</code></li>
<li class="pre-context-line"><code> end
</code></li>
<li class="pre-context-line"><code>
</code></li>
<li class="pre-context-line"><code> # Rack call
interface.
</code></li>
<li class="pre-context-line"><code> def call(env)
</code></li>
</ol>
<ol start="364" class="context" id="7"
onclick="toggle(7);">
<li class="context-line" id="context-7"><code>
dup.call!(env)</code></li>
</ol>
<ol start="365" class="post-context"
id="post-7" onclick="toggle(7);">
<li class="post-context-line"><code> end
</code></li>
<li class="post-context-line"><code>
</code></li>
<li class="post-context-line"><code> attr_accessor
:env, :request, :response, :params
</code></li>
<li class="post-context-line"><code>
</code></li>
<li class="post-context-line"><code> def call!(env)
</code></li>
<li class="post-context-line"><code> @env = env
</code></li>
<li class="post-context-line"><code> @request =
Request.new(env)
</code></li>
</ol>
<div class="clear"></div>
</li>
<li class="frame-info system">
<code>/usr/lib/ruby/gems/1.8/gems/rack-1.0.0/lib/rack/showexceptions.rb</code>
in
<code><strong>call</strong></code>
</li>
<li class="code system">
<ol start="17"
class="pre-context" id="pre-8"
onclick="toggle(8);">
<li class="pre-context-line"><code>
</code></li>
<li class="pre-context-line"><code> def initialize(app)
</code></li>
<li class="pre-context-line"><code> @app = app
</code></li>
<li class="pre-context-line"><code> @template =
ERB.new(TEMPLATE)
</code></li>
<li class="pre-context-line"><code> end
</code></li>
<li class="pre-context-line"><code>
</code></li>
<li class="pre-context-line"><code> def call(env)
</code></li>
</ol>
<ol start="24" class="context" id="8"
onclick="toggle(8);">
<li class="context-line" id="context-8"><code>
@app.call(env)</code></li>
</ol>
<ol start="25" class="post-context"
id="post-8" onclick="toggle(8);">
<li class="post-context-line"><code> rescue
StandardError, LoadError, SyntaxError => e
</code></li>
<li class="post-context-line"><code> backtrace =
pretty(env, e)
</code></li>
<li class="post-context-line"><code> [500,
</code></li>
<li class="post-context-line"><code>
{"Content-Type" => "text/html",
</code></li>
<li class="post-context-line"><code>
"Content-Length" => backtrace.join.size.to_s},
</code></li>
<li class="post-context-line"><code> backtrace]
</code></li>
<li class="post-context-line"><code> end
</code></li>
</ol>
<div class="clear"></div>
</li>
<li class="frame-info system">
<code>/usr/lib/ruby/gems/1.8/gems/rack-1.0.0/lib/rack/methodoverride.rb</code>
in
<code><strong>call</strong></code>
</li>
<li class="code system">
<ol start="17"
class="pre-context" id="pre-9"
onclick="toggle(9);">
<li class="pre-context-line"><code> method =
method.to_s.upcase
</code></li>
<li class="pre-context-line"><code> if
HTTP_METHODS.include?(method)
</code></li>
<li class="pre-context-line"><code>
env["rack.methodoverride.original_method"] =
env["REQUEST_METHOD"]
</code></li>
<li class="pre-context-line"><code>
env["REQUEST_METHOD"] = method
</code></li>
<li class="pre-context-line"><code> end
</code></li>
<li class="pre-context-line"><code> end
</code></li>
<li class="pre-context-line"><code>
</code></li>
</ol>
<ol start="24" class="context" id="9"
onclick="toggle(9);">
<li class="context-line" id="context-9"><code>
@app.call(env)</code></li>
</ol>
<ol start="25" class="post-context"
id="post-9" onclick="toggle(9);">
<li class="post-context-line"><code> end
</code></li>
<li class="post-context-line"><code> end
</code></li>
<li class="post-context-line"><code>end
</code></li>
</ol>
<div class="clear"></div>
</li>
<li class="frame-info system">
<code>/usr/lib/ruby/gems/1.8/gems/rack-1.0.0/lib/rack/commonlogger.rb</code>
in
<code><strong>_call</strong></code>
</li>
<li class="code system">
<ol start="13"
class="pre-context" id="pre-10"
onclick="toggle(10);">
<li class="pre-context-line"><code> dup._call(env)
</code></li>
<li class="pre-context-line"><code> end
</code></li>
<li class="pre-context-line"><code>
</code></li>
<li class="pre-context-line"><code> def _call(env)
</code></li>
<li class="pre-context-line"><code> @env = env
</code></li>
<li class="pre-context-line"><code> @logger ||= self
</code></li>
<li class="pre-context-line"><code> @time = Time.now
</code></li>
</ol>
<ol start="20" class="context" id="10"
onclick="toggle(10);">
<li class="context-line" id="context-10"><code>
@status, @header, @body = @app.call(env)</code></li>
</ol>
<ol start="21" class="post-context"
id="post-10" onclick="toggle(10);">
<li class="post-context-line"><code> [@status,
@header, self]
</code></li>
<li class="post-context-line"><code> end
</code></li>
<li class="post-context-line"><code>
</code></li>
<li class="post-context-line"><code> def close
</code></li>
<li class="post-context-line"><code> @body.close if
@body.respond_to? :close
</code></li>
<li class="post-context-line"><code> end
</code></li>
<li class="post-context-line"><code>
</code></li>
</ol>
<div class="clear"></div>
</li>
<li class="frame-info system">
<code>/usr/lib/ruby/gems/1.8/gems/rack-1.0.0/lib/rack/commonlogger.rb</code>
in
<code><strong>call</strong></code>
</li>
<li class="code system">
<ol start="6"
class="pre-context" id="pre-11"
onclick="toggle(11);">
<li class="pre-context-line"><code> class CommonLogger
</code></li>
<li class="pre-context-line"><code> def
initialize(app, logger=nil)
</code></li>
<li class="pre-context-line"><code> @app = app
</code></li>
<li class="pre-context-line"><code> @logger = logger
</code></li>
<li class="pre-context-line"><code> end
</code></li>
<li class="pre-context-line"><code>
</code></li>
<li class="pre-context-line"><code> def call(env)
</code></li>
</ol>
<ol start="13" class="context" id="11"
onclick="toggle(11);">
<li class="context-line" id="context-11"><code>
dup._call(env)</code></li>
</ol>
<ol start="14" class="post-context"
id="post-11" onclick="toggle(11);">
<li class="post-context-line"><code> end
</code></li>
<li class="post-context-line"><code>
</code></li>
<li class="post-context-line"><code> def _call(env)
</code></li>
<li class="post-context-line"><code> @env = env
</code></li>
<li class="post-context-line"><code> @logger ||= self
</code></li>
<li class="post-context-line"><code> @time = Time.now
</code></li>
<li class="post-context-line"><code> @status,
@header, @body = @app.call(env)
</code></li>
</ol>
<div class="clear"></div>
</li>
<li class="frame-info framework">
<code>/usr/lib/ruby/gems/1.8/gems/sinatra-0.9.4/lib/sinatra/base.rb</code>
in
<code><strong>call</strong></code>
</li>
<li class="code framework">
<ol start="891"
class="pre-context" id="pre-12"
onclick="toggle(12);">
<li class="pre-context-line"><code>
</code></li>
<li class="pre-context-line"><code>
@middleware.each { |c,a,b| builder.use(c, *a, &b) }
</code></li>
<li class="pre-context-line"><code> builder.run super
</code></li>
<li class="pre-context-line"><code> builder.to_app
</code></li>
<li class="pre-context-line"><code> end
</code></li>
<li class="pre-context-line"><code>
</code></li>
<li class="pre-context-line"><code> def call(env)
</code></li>
</ol>
<ol start="898" class="context" id="12"
onclick="toggle(12);">
<li class="context-line" id="context-12"><code>
synchronize { prototype.call(env) }</code></li>
</ol>
<ol start="899" class="post-context"
id="post-12" onclick="toggle(12);">
<li class="post-context-line"><code> end
</code></li>
<li class="post-context-line"><code>
</code></li>
<li class="post-context-line"><code> def
reset!(base=superclass)
</code></li>
<li class="post-context-line"><code> @routes
= base.dupe_routes
</code></li>
<li class="post-context-line"><code> @templates
= base.templates.dup
</code></li>
<li class="post-context-line"><code> @conditions = []
</code></li>
<li class="post-context-line"><code> @filters
= base.filters.dup
</code></li>
</ol>
<div class="clear"></div>
</li>
<li class="frame-info framework">
<code>/usr/lib/ruby/gems/1.8/gems/sinatra-0.9.4/lib/sinatra/base.rb</code>
in
<code><strong>synchronize</strong></code>
</li>
<li class="code framework">
<ol start="936"
class="pre-context" id="pre-13"
onclick="toggle(13);">
<li class="pre-context-line"><code> end
</code></li>
<li class="pre-context-line"><code>
</code></li>
<li class="pre-context-line"><code> @@mutex = Mutex.new
</code></li>
<li class="pre-context-line"><code> def
synchronize(&block)
</code></li>
<li class="pre-context-line"><code> if lock?
</code></li>
<li class="pre-context-line"><code>
@@mutex.synchronize(&block)
</code></li>
<li class="pre-context-line"><code> else
</code></li>
</ol>
<ol start="943" class="context" id="13"
onclick="toggle(13);">
<li class="context-line" id="context-13"><code>
yield</code></li>
</ol>
<ol start="944" class="post-context"
id="post-13" onclick="toggle(13);">
<li class="post-context-line"><code> end
</code></li>
<li class="post-context-line"><code> end
</code></li>
<li class="post-context-line"><code>
</code></li>
<li class="post-context-line"><code> def
metadef(message, &block)
</code></li>
<li class="post-context-line"><code> (class
<< self; self; end).
</code></li>
<li class="post-context-line"><code> send
:define_method, message, &block
</code></li>
<li class="post-context-line"><code> end
</code></li>
</ol>
<div class="clear"></div>
</li>
<li class="frame-info framework">
<code>/usr/lib/ruby/gems/1.8/gems/sinatra-0.9.4/lib/sinatra/base.rb</code>
in
<code><strong>call</strong></code>
</li>
<li class="code framework">
<ol start="891"
class="pre-context" id="pre-14"
onclick="toggle(14);">
<li class="pre-context-line"><code>
</code></li>
<li class="pre-context-line"><code>
@middleware.each { |c,a,b| builder.use(c, *a, &b) }
</code></li>
<li class="pre-context-line"><code> builder.run super
</code></li>
<li class="pre-context-line"><code> builder.to_app
</code></li>
<li class="pre-context-line"><code> end
</code></li>
<li class="pre-context-line"><code>
</code></li>
<li class="pre-context-line"><code> def call(env)
</code></li>
</ol>
<ol start="898" class="context" id="14"
onclick="toggle(14);">
<li class="context-line" id="context-14"><code>
synchronize { prototype.call(env) }</code></li>
</ol>
<ol start="899" class="post-context"
id="post-14" onclick="toggle(14);">
<li class="post-context-line"><code> end
</code></li>
<li class="post-context-line"><code>
</code></li>
<li class="post-context-line"><code> def
reset!(base=superclass)
</code></li>
<li class="post-context-line"><code> @routes
= base.dupe_routes
</code></li>
<li class="post-context-line"><code> @templates
= base.templates.dup
</code></li>
<li class="post-context-line"><code> @conditions = []
</code></li>
<li class="post-context-line"><code> @filters
= base.filters.dup
</code></li>
</ol>
<div class="clear"></div>
</li>
<li class="frame-info system">
<code>/usr/lib/ruby/gems/1.8/gems/rack-1.0.0/lib/rack/content_length.rb</code>
in
<code><strong>call</strong></code>
</li>
<li class="code system">
<ol start="6"
class="pre-context" id="pre-15"
onclick="toggle(15);">
<li class="pre-context-line"><code> include Rack::Utils
</code></li>
<li class="pre-context-line"><code>
</code></li>
<li class="pre-context-line"><code> def initialize(app)
</code></li>
<li class="pre-context-line"><code> @app = app
</code></li>
<li class="pre-context-line"><code> end
</code></li>
<li class="pre-context-line"><code>
</code></li>
<li class="pre-context-line"><code> def call(env)
</code></li>
</ol>
<ol start="13" class="context" id="15"
onclick="toggle(15);">
<li class="context-line" id="context-15"><code>
status, headers, body = @app.call(env)</code></li>
</ol>
<ol start="14" class="post-context"
id="post-15" onclick="toggle(15);">
<li class="post-context-line"><code> headers =
HeaderHash.new(headers)
</code></li>
<li class="post-context-line"><code>
</code></li>
<li class="post-context-line"><code> if
!STATUS_WITH_NO_ENTITY_BODY.include?(status) &&
</code></li>
<li class="post-context-line"><code>
!headers['Content-Length'] &&
</code></li>
<li class="post-context-line"><code>
!headers['Transfer-Encoding'] &&
</code></li>
<li class="post-context-line"><code>
(body.respond_to?(:to_ary) || body.respond_to?(:to_str))
</code></li>
<li class="post-context-line"><code>
</code></li>
</ol>
<div class="clear"></div>
</li>
<li class="frame-info system">
<code>/usr/lib/ruby/gems/1.8/gems/rack-1.0.0/lib/rack/chunked.rb</code> in
<code><strong>call</strong></code>
</li>
<li class="code system">
<ol start="8"
class="pre-context" id="pre-16"
onclick="toggle(16);">
<li class="pre-context-line"><code> include Rack::Utils
</code></li>
<li class="pre-context-line"><code>
</code></li>
<li class="pre-context-line"><code> def initialize(app)
</code></li>
<li class="pre-context-line"><code> @app = app
</code></li>
<li class="pre-context-line"><code> end
</code></li>
<li class="pre-context-line"><code>
</code></li>
<li class="pre-context-line"><code> def call(env)
</code></li>
</ol>
<ol start="15" class="context" id="16"
onclick="toggle(16);">
<li class="context-line" id="context-16"><code>
status, headers, body = @app.call(env)</code></li>
</ol>
<ol start="16" class="post-context"
id="post-16" onclick="toggle(16);">
<li class="post-context-line"><code> headers =
HeaderHash.new(headers)
</code></li>
<li class="post-context-line"><code>
</code></li>
<li class="post-context-line"><code> if
env['HTTP_VERSION'] == 'HTTP/1.0' ||
</code></li>
<li class="post-context-line"><code>
STATUS_WITH_NO_ENTITY_BODY.include?(status) ||
</code></li>
<li class="post-context-line"><code>
headers['Content-Length'] ||
</code></li>
<li class="post-context-line"><code>
headers['Transfer-Encoding']
</code></li>
<li class="post-context-line"><code> [status,
headers.to_hash, body]
</code></li>
</ol>
<div class="clear"></div>
</li>
<li class="frame-info system">
<code>/usr/lib/ruby/gems/1.8/gems/thin-1.2.4/lib/thin/connection.rb</code>
in
<code><strong>pre_process</strong></code>
</li>
<li class="code system">
<ol start="69"
class="pre-context" id="pre-17"
onclick="toggle(17);">
<li class="pre-context-line"><code>
</code></li>
<li class="pre-context-line"><code> # When
we're under a non-async framework like rails, we can still spawn
</code></li>
<li class="pre-context-line"><code> # off async
responses using the callback info, so there's little point
</code></li>
<li class="pre-context-line"><code> # in removing this.
</code></li>
<li class="pre-context-line"><code> response =
AsyncResponse
</code></li>
<li class="pre-context-line"><code> catch(:async) do
</code></li>
<li class="pre-context-line"><code> # Process the
request calling the Rack adapter
</code></li>
</ol>
<ol start="76" class="context" id="17"
onclick="toggle(17);">
<li class="context-line" id="context-17"><code>
response = @app.call(@request.env)</code></li>
</ol>
<ol start="77" class="post-context"
id="post-17" onclick="toggle(17);">
<li class="post-context-line"><code> end
</code></li>
<li class="post-context-line"><code> response
</code></li>
<li class="post-context-line"><code> rescue Exception
</code></li>
<li class="post-context-line"><code> handle_error
</code></li>
<li class="post-context-line"><code> terminate_request
</code></li>
<li class="post-context-line"><code> nil # Signal
to post_process that the request could not be processed
</code></li>
<li class="post-context-line"><code> end
</code></li>
</ol>
<div class="clear"></div>
</li>
<li class="frame-info system">
<code>/usr/lib/ruby/gems/1.8/gems/thin-1.2.4/lib/thin/connection.rb</code>
in
<code><strong>catch</strong></code>
</li>
<li class="code system">
<ol start="67"
class="pre-context" id="pre-18"
onclick="toggle(18);">
<li class="pre-context-line"><code> # callback is
no longer referenced, so be tidy!
</code></li>
<li class="pre-context-line"><code>
@request.async_callback = method(:post_process)
</code></li>
<li class="pre-context-line"><code>
</code></li>
<li class="pre-context-line"><code> # When
we're under a non-async framework like rails, we can still spawn
</code></li>
<li class="pre-context-line"><code> # off async
responses using the callback info, so there's little point
</code></li>
<li class="pre-context-line"><code> # in removing this.
</code></li>
<li class="pre-context-line"><code> response =
AsyncResponse
</code></li>
</ol>
<ol start="74" class="context" id="18"
onclick="toggle(18);">
<li class="context-line" id="context-18"><code>
catch(:async) do</code></li>
</ol>
<ol start="75" class="post-context"
id="post-18" onclick="toggle(18);">
<li class="post-context-line"><code> # Process
the request calling the Rack adapter
</code></li>
<li class="post-context-line"><code> response =
@app.call(@request.env)
</code></li>
<li class="post-context-line"><code> end
</code></li>
<li class="post-context-line"><code> response
</code></li>
<li class="post-context-line"><code> rescue Exception
</code></li>
<li class="post-context-line"><code> handle_error
</code></li>
<li class="post-context-line"><code> terminate_request
</code></li>
</ol>
<div class="clear"></div>
</li>
<li class="frame-info system">
<code>/usr/lib/ruby/gems/1.8/gems/thin-1.2.4/lib/thin/connection.rb</code>
in
<code><strong>pre_process</strong></code>
</li>
<li class="code system">
<ol start="67"
class="pre-context" id="pre-19"
onclick="toggle(19);">
<li class="pre-context-line"><code> # callback is
no longer referenced, so be tidy!
</code></li>
<li class="pre-context-line"><code>
@request.async_callback = method(:post_process)
</code></li>
<li class="pre-context-line"><code>
</code></li>
<li class="pre-context-line"><code> # When
we're under a non-async framework like rails, we can still spawn
</code></li>
<li class="pre-context-line"><code> # off async
responses using the callback info, so there's little point
</code></li>
<li class="pre-context-line"><code> # in removing this.
</code></li>
<li class="pre-context-line"><code> response =
AsyncResponse
</code></li>
</ol>
<ol start="74" class="context" id="19"
onclick="toggle(19);">
<li class="context-line" id="context-19"><code>
catch(:async) do</code></li>
</ol>
<ol start="75" class="post-context"
id="post-19" onclick="toggle(19);">
<li class="post-context-line"><code> # Process
the request calling the Rack adapter
</code></li>
<li class="post-context-line"><code> response =
@app.call(@request.env)
</code></li>
<li class="post-context-line"><code> end
</code></li>
<li class="post-context-line"><code> response
</code></li>
<li class="post-context-line"><code> rescue Exception
</code></li>
<li class="post-context-line"><code> handle_error
</code></li>
<li class="post-context-line"><code> terminate_request
</code></li>
</ol>
<div class="clear"></div>
</li>
<li class="frame-info system">
<code>/usr/lib/ruby/gems/1.8/gems/thin-1.2.4/lib/thin/connection.rb</code>
in
<code><strong>process</strong></code>
</li>
<li class="code system">
<ol start="50"
class="pre-context" id="pre-20"
onclick="toggle(20);">
<li class="pre-context-line"><code> # is ready to be
processed.
</code></li>
<li class="pre-context-line"><code> def process
</code></li>
<li class="pre-context-line"><code> if threaded?
</code></li>
<li class="pre-context-line"><code>
@request.threaded = true
</code></li>
<li class="pre-context-line"><code>
EventMachine.defer(method(:pre_process), method(:post_process))
</code></li>
<li class="pre-context-line"><code> else
</code></li>
<li class="pre-context-line"><code>
@request.threaded = false
</code></li>
</ol>
<ol start="57" class="context" id="20"
onclick="toggle(20);">
<li class="context-line" id="context-20"><code>
post_process(pre_process)</code></li>
</ol>
<ol start="58" class="post-context"
id="post-20" onclick="toggle(20);">
<li class="post-context-line"><code> end
</code></li>
<li class="post-context-line"><code> end
</code></li>
<li class="post-context-line"><code>
</code></li>
<li class="post-context-line"><code> def pre_process
</code></li>
<li class="post-context-line"><code> # Add client
info to the request env
</code></li>
<li class="post-context-line"><code>
@request.remote_address = remote_address
</code></li>
<li class="post-context-line"><code>
</code></li>
</ol>
<div class="clear"></div>
</li>
<li class="frame-info system">
<code>/usr/lib/ruby/gems/1.8/gems/thin-1.2.4/lib/thin/connection.rb</code>
in
<code><strong>receive_data</strong></code>
</li>
<li class="code system">
<ol start="35"
class="pre-context" id="pre-21"
onclick="toggle(21);">
<li class="pre-context-line"><code> @request =
Request.new
</code></li>
<li class="pre-context-line"><code> @response =
Response.new
</code></li>
<li class="pre-context-line"><code> end
</code></li>
<li class="pre-context-line"><code>
</code></li>
<li class="pre-context-line"><code> # Called when
data is received from the client.
</code></li>
<li class="pre-context-line"><code> def
receive_data(data)
</code></li>
<li class="pre-context-line"><code> trace { data }
</code></li>
</ol>
<ol start="42" class="context" id="21"
onclick="toggle(21);">
<li class="context-line" id="context-21"><code>
process if @request.parse(data)</code></li>
</ol>
<ol start="43" class="post-context"
id="post-21" onclick="toggle(21);">
<li class="post-context-line"><code> rescue
InvalidRequest => e
</code></li>
<li class="post-context-line"><code> log "!!
Invalid request"
</code></li>
<li class="post-context-line"><code> log_error e
</code></li>
<li class="post-context-line"><code> close_connection
</code></li>
<li class="post-context-line"><code> end
</code></li>
<li class="post-context-line"><code>
</code></li>
<li class="post-context-line"><code> # Called when
all data was received and the request
</code></li>
</ol>
<div class="clear"></div>
</li>
<li class="frame-info system">
<code>/usr/lib/ruby/gems/1.8/gems/eventmachine-0.12.8/lib/eventmachine.rb</code>
in
<code><strong>run_machine</strong></code>
</li>
<li class="code system">
<ol start="235"
class="pre-context" id="pre-22"
onclick="toggle(22);">
<li class="pre-context-line"><code>
@reactor_running = true
</code></li>
<li class="pre-context-line"><code>
initialize_event_machine
</code></li>
<li class="pre-context-line"><code> (b = blk ||
block) and add_timer(0, b)
</code></li>
<li class="pre-context-line"><code> if
@next_tick_queue && !@next_tick_queue.empty?
</code></li>
<li class="pre-context-line"><code>
add_timer(0) { signal_loopbreak }
</code></li>
<li class="pre-context-line"><code> end
</code></li>
<li class="pre-context-line"><code>
@reactor_thread = Thread.current
</code></li>
</ol>
<ol start="242" class="context" id="22"
onclick="toggle(22);">
<li class="context-line" id="context-22"><code>
run_machine</code></li>
</ol>
<ol start="243" class="post-context"
id="post-22" onclick="toggle(22);">
<li class="post-context-line"><code> ensure
</code></li>
<li class="post-context-line"><code> begin
</code></li>
<li class="post-context-line"><code>
release_machine
</code></li>
<li class="post-context-line"><code> ensure
</code></li>
<li class="post-context-line"><code> if @threadpool
</code></li>
<li class="post-context-line"><code>
@threadpool.each { |t| t.exit }
</code></li>
<li class="post-context-line"><code>
@threadpool.each { |t| t.kill! if t.alive? }
</code></li>
</ol>
<div class="clear"></div>
</li>
<li class="frame-info system">
<code>/usr/lib/ruby/gems/1.8/gems/eventmachine-0.12.8/lib/eventmachine.rb</code>
in
<code><strong>run</strong></code>
</li>
<li class="code system">
<ol start="235"
class="pre-context" id="pre-23"
onclick="toggle(23);">
<li class="pre-context-line"><code>
@reactor_running = true
</code></li>
<li class="pre-context-line"><code>
initialize_event_machine
</code></li>
<li class="pre-context-line"><code> (b = blk ||
block) and add_timer(0, b)
</code></li>
<li class="pre-context-line"><code> if
@next_tick_queue && !@next_tick_queue.empty?
</code></li>
<li class="pre-context-line"><code>
add_timer(0) { signal_loopbreak }
</code></li>
<li class="pre-context-line"><code> end
</code></li>
<li class="pre-context-line"><code>
@reactor_thread = Thread.current
</code></li>
</ol>
<ol start="242" class="context" id="23"
onclick="toggle(23);">
<li class="context-line" id="context-23"><code>
run_machine</code></li>
</ol>
<ol start="243" class="post-context"
id="post-23" onclick="toggle(23);">
<li class="post-context-line"><code> ensure
</code></li>
<li class="post-context-line"><code> begin
</code></li>
<li class="post-context-line"><code>
release_machine
</code></li>
<li class="post-context-line"><code> ensure
</code></li>
<li class="post-context-line"><code> if @threadpool
</code></li>
<li class="post-context-line"><code>
@threadpool.each { |t| t.exit }
</code></li>
<li class="post-context-line"><code>
@threadpool.each { |t| t.kill! if t.alive? }
</code></li>
</ol>
<div class="clear"></div>
</li>
<li class="frame-info system">
<code>/usr/lib/ruby/gems/1.8/gems/thin-1.2.4/lib/thin/backends/base.rb</code>
in
<code><strong>start</strong></code>
</li>
<li class="code system">
<ol start="50"
class="pre-context" id="pre-24"
onclick="toggle(24);">
<li class="pre-context-line"><code> @running = true
</code></li>
<li class="pre-context-line"><code> end
</code></li>
<li class="pre-context-line"><code>
</code></li>
<li class="pre-context-line"><code> # Allow for
early run up of eventmachine.
</code></li>
<li class="pre-context-line"><code> if
EventMachine.reactor_running?
</code></li>
<li class="pre-context-line"><code> starter.call
</code></li>
<li class="pre-context-line"><code> else
</code></li>
</ol>
<ol start="57" class="context" id="24"
onclick="toggle(24);">
<li class="context-line" id="context-24"><code>
EventMachine.run(&starter)</code></li>
</ol>
<ol start="58" class="post-context"
id="post-24" onclick="toggle(24);">
<li class="post-context-line"><code> end
</code></li>
<li class="post-context-line"><code> end
</code></li>
<li class="post-context-line"><code>
</code></li>
<li class="post-context-line"><code> # Stop of the
backend from accepting new connections.
</code></li>
<li class="post-context-line"><code> def stop
</code></li>
<li class="post-context-line"><code> @running =
false
</code></li>
<li class="post-context-line"><code> @stopping = true
</code></li>
</ol>
<div class="clear"></div>
</li>
<li class="frame-info system">
<code>/usr/lib/ruby/gems/1.8/gems/thin-1.2.4/lib/thin/server.rb</code> in
<code><strong>start</strong></code>
</li>
<li class="code system">
<ol start="149"
class="pre-context" id="pre-25"
onclick="toggle(25);">
<li class="pre-context-line"><code> log
">> Thin web server (v#{VERSION::STRING} codename
#{VERSION::CODENAME})"
</code></li>
<li class="pre-context-line"><code> debug
">> Debugging ON"
</code></li>
<li class="pre-context-line"><code> trace
">> Tracing ON"
</code></li>
<li class="pre-context-line"><code>
</code></li>
<li class="pre-context-line"><code> log
">> Maximum connections set to
#{@backend.maximum_connections}"
</code></li>
<li class="pre-context-line"><code> log
">> Listening on #{@backend}, CTRL+C to stop"
</code></li>
<li class="pre-context-line"><code>
</code></li>
</ol>
<ol start="156" class="context" id="25"
onclick="toggle(25);">
<li class="context-line" id="context-25"><code>
@backend.start</code></li>
</ol>
<ol start="157" class="post-context"
id="post-25" onclick="toggle(25);">
<li class="post-context-line"><code> end
</code></li>
<li class="post-context-line"><code> alias :start! :start
</code></li>
<li class="post-context-line"><code>
</code></li>
<li class="post-context-line"><code> # == Gracefull
shutdown
</code></li>
<li class="post-context-line"><code> # Stops the
server after processing all current connections.
</code></li>
<li class="post-context-line"><code> # As soon as
this method is called, the server stops accepting
</code></li>
<li class="post-context-line"><code> # new requests
and wait for all current connections to finish.
</code></li>
</ol>
<div class="clear"></div>
</li>
<li class="frame-info system">
<code>/usr/lib/ruby/gems/1.8/gems/rack-1.0.0/lib/rack/handler/thin.rb</code>
in
<code><strong>run</strong></code>
</li>
<li class="code system">
<ol start="7"
class="pre-context" id="pre-26"
onclick="toggle(26);">
<li class="pre-context-line"><code> class Thin
</code></li>
<li class="pre-context-line"><code> def
self.run(app, options={})
</code></li>
<li class="pre-context-line"><code> app =
Rack::Chunked.new(Rack::ContentLength.new(app))
</code></li>
<li class="pre-context-line"><code> server =
::Thin::Server.new(options[:Host] || '0.0.0.0',
</code></li>
<li
class="pre-context-line"><code>
options[:Port] || 8080,
</code></li>
<li
class="pre-context-line"><code> app)
</code></li>
<li class="pre-context-line"><code> yield server
if block_given?
</code></li>
</ol>
<ol start="14" class="context" id="26"
onclick="toggle(26);">
<li class="context-line" id="context-26"><code>
server.start</code></li>
</ol>
<ol start="15" class="post-context"
id="post-26" onclick="toggle(26);">
<li class="post-context-line"><code> end
</code></li>
<li class="post-context-line"><code> end
</code></li>
<li class="post-context-line"><code> end
</code></li>
<li class="post-context-line"><code>end
</code></li>
</ol>
<div class="clear"></div>
</li>
<li class="frame-info framework">
<code>/usr/lib/ruby/gems/1.8/gems/sinatra-0.9.4/lib/sinatra/base.rb</code>
in
<code><strong>run!</strong></code>
</li>
<li class="code framework">
<ol start="859"
class="pre-context" id="pre-27"
onclick="toggle(27);">
<li class="pre-context-line"><code> # Thin, Mongrel
or WEBrick (in that order)
</code></li>
<li class="pre-context-line"><code> def
run!(options={})
</code></li>
<li class="pre-context-line"><code> set options
</code></li>
<li class="pre-context-line"><code> handler
= detect_rack_handler
</code></li>
<li class="pre-context-line"><code> handler_name
= handler.name.gsub(/.*::/, '')
</code></li>
<li class="pre-context-line"><code> puts "==
Sinatra/#{Sinatra::VERSION} has taken the stage " +
</code></li>
<li class="pre-context-line"><code> "on
#{port} for #{environment} with backup from #{handler_name}" unless
handler_name =~/cgi/i
</code></li>
</ol>
<ol start="866" class="context" id="27"
onclick="toggle(27);">
<li class="context-line" id="context-27"><code>
handler.run self, :Host => host, :Port => port do |server|</code></li>
</ol>
<ol start="867" class="post-context"
id="post-27" onclick="toggle(27);">
<li class="post-context-line"><code> trap(:INT) do
</code></li>
<li class="post-context-line"><code> ## Use
thins' hard #stop! if available, otherwise just #stop
</code></li>
<li class="post-context-line"><code>
server.respond_to?(:stop!) ? server.stop! : server.stop
</code></li>
<li class="post-context-line"><code> puts
"\n== Sinatra has ended his set (crowd applauds)" unless
handler_name =~/cgi/i
</code></li>
<li class="post-context-line"><code> end
</code></li>
<li class="post-context-line"><code> end
</code></li>
<li class="post-context-line"><code> rescue
Errno::EADDRINUSE => e
</code></li>
</ol>
<div class="clear"></div>
</li>
<li class="frame-info framework">
<code>/usr/lib/ruby/gems/1.8/gems/sinatra-0.9.4/lib/sinatra/main.rb</code>
in
<code><strong>nil</strong></code>
</li>
<li class="code framework">
<ol start="27"
class="pre-context" id="pre-28"
onclick="toggle(28);">
<li class="pre-context-line"><code>def mime(ext, type)
</code></li>
<li class="pre-context-line"><code> ext =
".#{ext}" unless ext.to_s[0] == ?.
</code></li>
<li class="pre-context-line"><code>
Rack::Mime::MIME_TYPES[ext.to_s] = type
</code></li>
<li class="pre-context-line"><code>end
</code></li>
<li class="pre-context-line"><code>
</code></li>
<li class="pre-context-line"><code>at_exit do
</code></li>
<li class="pre-context-line"><code> raise $! if $!
</code></li>
</ol>
<ol start="34" class="context" id="28"
onclick="toggle(28);">
<li class="context-line" id="context-28"><code>
Sinatra::Application.run! if Sinatra::Application.run?</code></li>
</ol>
<ol start="35" class="post-context"
id="post-28" onclick="toggle(28);">
<li class="post-context-line"><code>end
</code></li>
</ol>
<div class="clear"></div>
</li>
<li class="frame-info app">
<code>/home/garym/one/lib/ruby/occi/OCCIServer.rb</code> in
<code><strong>nil</strong></code>
</li>
<li class="code app">
<ol start="427"
class="pre-context" id="pre-29"
onclick="toggle(29);">
<li
class="pre-context-line"><code>
"</DISK>"
</code></li>
<li class="pre-context-line"><code> else
</code></li>
<li class="pre-context-line"><code> status 404
</code></li>
<li class="pre-context-line"><code> "Disk
with id = \"" + params[:id] + "\" not found"
</code></li>
<li class="pre-context-line"><code> end
</code></li>
<li class="pre-context-line"><code>end
</code></li>
<li class="pre-context-line"><code>
</code></li>
</ol>
<ol start="434" class="context" id="29"
onclick="toggle(29);">
<li class="context-line" id="context-29"><code>delete
'/storage/:id' do</code></li>
</ol>
<ol start="435" class="post-context"
id="post-29" onclick="toggle(29);">
<li class="post-context-line"><code> protected!
</code></li>
<li class="post-context-line"><code> "Not yet
implemented"
</code></li>
<li class="post-context-line"><code>end
</code></li>
<li class="post-context-line"><code>
</code></li>
<li class="post-context-line"><code>
</code></li>
<li class="post-context-line"><code>
</code></li>
<li class="post-context-line"><code>
</code></li>
</ol>
<div class="clear"></div>
</li>
</ul>
</div> <!-- /BACKTRACE -->
<div id="get">
<h3 id="get-info">GET</h3>
<p class="no-data">No GET data.</p>
<div class="clear"></div>
</div> <!-- /GET -->
<div id="post">
<h3 id="post-info">POST</h3>
<p class="no-data">No POST data.</p>
<div class="clear"></div>
</div> <!-- /POST -->
<div id="cookies">
<h3 id="cookie-info">COOKIES</h3>
<p class="no-data">No cookie data.</p>
<div class="clear"></div>
</div> <!-- /COOKIES -->
<div id="rack">
<h3 id="env-info">Rack ENV</h3>
<table class="req">
<tr>
<th>Variable</th>
<th>Value</th>
</tr>
<tr>
<td>GATEWAY_INTERFACE</td>
<td class="code"><div>CGI/1.2</div></td>
</tr>
<tr>
<td>HTTP_ACCEPT</td>
<td class="code"><div>*/*</div></td>
</tr>
<tr>
<td>HTTP_AUTHORIZATION</td>
<td class="code"><div>Basic
bWFyaWE6ZTIxZmM1NmMxYTI3MmI2MzBlMGQxNDM5MDc5ZDA1OThjZjhiODMyOQ==</div></td>
</tr>
<tr>
<td>HTTP_HOST</td>
<td class="code"><div>cloud.exxia.com:4567</div></td>
</tr>
<tr>
<td>HTTP_VERSION</td>
<td class="code"><div>HTTP/1.1</div></td>
</tr>
<tr>
<td>PATH_INFO</td>
<td class="code"><div>/network</div></td>
</tr>
<tr>
<td>QUERY_STRING</td>
<td class="code"><div></div></td>
</tr>
<tr>
<td>REMOTE_ADDR</td>
<td class="code"><div>172.31.1.102</div></td>
</tr>
<tr>
<td>REQUEST_METHOD</td>
<td class="code"><div>GET</div></td>
</tr>
<tr>
<td>REQUEST_PATH</td>
<td class="code"><div>/network</div></td>
</tr>
<tr>
<td>REQUEST_URI</td>
<td class="code"><div>/network</div></td>
</tr>
<tr>
<td>SCRIPT_NAME</td>
<td class="code"><div></div></td>
</tr>
<tr>
<td>SERVER_NAME</td>
<td class="code"><div>cloud.exxia.com</div></td>
</tr>
<tr>
<td>SERVER_PORT</td>
<td class="code"><div>4567</div></td>
</tr>
<tr>
<td>SERVER_PROTOCOL</td>
<td class="code"><div>HTTP/1.1</div></td>
</tr>
<tr>
<td>SERVER_SOFTWARE</td>
<td class="code"><div>thin 1.2.4 codename Flaming
Astroboy</div></td>
</tr>
<tr>
<td>async.callback</td>
<td class="code"><div>#<Method:
Thin::Connection#post_process></div></td>
</tr>
<tr>
<td>async.close</td>
<td
class="code"><div>#<EventMachine::DefaultDeferrable:0xb7045e18></div></td>
</tr>
<tr>
<td>rack.errors</td>
<td class="code"><div>#<IO:0xb7ef4f54></div></td>
</tr>
<tr>
<td>rack.input</td>
<td class="code"><div>#<StringIO:0xb7046048></div></td>
</tr>
<tr>
<td>rack.multiprocess</td>
<td class="code"><div>false</div></td>
</tr>
<tr>
<td>rack.multithread</td>
<td class="code"><div>false</div></td>
</tr>
<tr>
<td>rack.request</td>
<td class="code"><div>#<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"}></div></td>
</tr>
<tr>
<td>rack.request.form_hash</td>
<td class="code"><div>{}</div></td>
</tr>
<tr>
<td>rack.request.form_input</td>
<td class="code"><div>#<StringIO:0xb7046048></div></td>
</tr>
<tr>
<td>rack.request.form_vars</td>
<td class="code"><div></div></td>
</tr>
<tr>
<td>rack.request.query_hash</td>
<td class="code"><div>{}</div></td>
</tr>
<tr>
<td>rack.request.query_string</td>
<td class="code"><div></div></td>
</tr>
<tr>
<td>rack.run_once</td>
<td class="code"><div>false</div></td>
</tr>
<tr>
<td>rack.url_scheme</td>
<td class="code"><div>http</div></td>
</tr>
<tr>
<td>rack.version</td>
<td class="code"><div>[1, 0]</div></td>
</tr>
</table>
<div class="clear"></div>
</div> <!-- /RACK ENV -->
<p id="explanation">You're seeing this error because you use you have
enabled the <code>show_exceptions</code> option.</p>
</div> <!-- /WRAP -->
</body>
</html>
More information about the Users
mailing list