deltacloud-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ronelle Landy (Created) (JIRA)" <j...@apache.org>
Subject [jira] [Created] (DTACLOUD-164) json output from creating an ec2 instance contains errors
Date Wed, 21 Mar 2012 12:59:39 GMT
json output from creating an ec2 instance contains errors
---------------------------------------------------------

                 Key: DTACLOUD-164
                 URL: https://issues.apache.org/jira/browse/DTACLOUD-164
             Project: DeltaCloud
          Issue Type: Bug
          Components: Server
         Environment: deltacloud git commit: 4a3fc20bb532296dfaea0c7c23eb09c3c7190f7c
ec2
            Reporter: Ronelle Landy
            Assignee: David Lutterkort


Using format=json, following text + is returned: (log shows: NoMethodError - undefined method
`to_hash' for nil:NilClass)
 
curl -X POST -F "image_id=ami-8cc035e5" -F "hwp_id=c1.medium" -F "realm_id=us-east-1c" --user
"username:password" "http://localhost:3009/api/instances?format=json"
 
       <tr>
           <td>rack.errors</td>
           <td class="code"><div>#&lt;Object:0x7fa05419f220&gt;</div></td>
         </tr>
         
         <tr>
           <td>rack.input</td>
           <td class="code"><div>#&lt;StringIO:0x7fa051260248&gt;</div></td>
         </tr>
         
         <tr>
           <td>rack.logger</td>
           <td class="code"><div>#&lt;Rack::NullLogger:0x7fa052c29e68 @app=#&lt;Rack::Protection::FrameOptions:0x7fa052c2a250
@options={:status=&gt;403, :frame_options=&gt;:sameorigin, :message=&gt;&quot;Forbidden&quot;,
:encryptor=&gt;Digest::SHA1, :except=&gt;[:escaped_params, :session_hijacking, :remote_token],
:session_key=&gt;&quot;rack.session&quot;, :xss_mode=&gt;:block, :allow_empty_referrer=&gt;true,
:reaction=&gt;:default_reaction, :logging=&gt;true}, @app=#&lt;Rack::Protection::IPSpoofing:0x7fa052c2a7f0
@options={:status=&gt;403, :message=&gt;&quot;Forbidden&quot;, :encryptor=&gt;Digest::SHA1,
:except=&gt;[:escaped_params, :session_hijacking, :remote_token], :session_key=&gt;&quot;rack.session&quot;,
:allow_empty_referrer=&gt;true, :reaction=&gt;:default_reaction, :logging=&gt;true},
@app=#&lt;Rack::Protection::JsonCsrf:0x7fa052c2ab88 @options={:status=&gt;403, :message=&gt;&quot;Forbidden&quot;,
:encryptor=&gt;Digest::SHA1, :except=&gt;[:escaped_params, :session_hijacking, :remote_token],
:session_key=&gt;&quot;rack.session&quot;, :allow_empty_referrer=&gt;true,
:reaction=&gt;:default_reaction, :logging=&gt;true}, @app=#&lt;Rack::Protection::PathTraversal:0x7fa052c2b1a0
@options={:status=&gt;403, :message=&gt;&quot;Forbidden&quot;, :encryptor=&gt;Digest::SHA1,
:except=&gt;[:escaped_params, :session_hijacking, :remote_token], :session_key=&gt;&quot;rack.session&quot;,
:allow_empty_referrer=&gt;true, :reaction=&gt;:default_reaction, :logging=&gt;true},
@app=#&lt;Rack::Protection::XSSHeader:0x7fa052c2c0a0 @options={:status=&gt;403, :encryptor=&gt;Digest::SHA1,
:message=&gt;&quot;Forbidden&quot;, :except=&gt;[:escaped_params, :session_hijacking,
:remote_token], :session_key=&gt;&quot;rack.session&quot;, :xss_mode=&gt;:block,
:allow_empty_referrer=&gt;true, :logging=&gt;true, :reaction=&gt;:default_reaction},
@app=#&lt;Rack::MediaType:0x7fa052d37a30 @default_layout=:layout, @template_cache=#&lt;Tilt::Cache:0x7fa052d37828
@cache={}&gt;, @app=#&lt;Rack::Date:0x7fa052d3fb68 @app=#&lt;Rack::CommonLogger:0x7fa052d3fcf8
@app=#&lt;Sinatra::Application:0x7fa052d403d8 @default_layout=:layout, @template_cache=#&lt;Tilt::Cache:0x7fa052d40180
@cache={}&gt;, @app=nil&gt;, @logger=nil&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;</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>true</div></td>
         </tr>
         
         <tr>
           <td>rack.request.cookie_hash</td>
           <td class="code"><div>{}</div></td>
         </tr>
         
         <tr>
           <td>rack.request.form_hash</td>
           <td class="code"><div>{&quot;image_id&quot;=&gt;&quot;ami-8cc035e5&quot;,
&quot;hwp_id&quot;=&gt;&quot;c1.medium&quot;, &quot;realm_id&quot;=&gt;&quot;us-east-1c&quot;}</div></td>
         </tr>
         
         <tr>
           <td>rack.request.form_input</td>
           <td class="code"><div>#&lt;StringIO:0x7fa051260248&gt;</div></td>
         </tr>
         
         <tr>
           <td>rack.request.query_hash</td>
           <td class="code"><div>{&quot;format&quot;=&gt;&quot;json&quot;}</div></td>
         </tr>
         
         <tr>
           <td>rack.request.query_string</td>
           <td class="code"><div>format=json</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>
         
         <tr>
           <td>sinatra.error</td>
           <td class="code"><div>#&lt;NoMethodError: undefined method `to_hash&#x27;
for nil:NilClass&gt;</div></td>
         </tr>
         
      </table>
      <div class="clear"></div>
    </div> <!-- /RACK ENV -->
 
    <p id="explanation">You're seeing this error because you have
enabled the <code>show_exceptions</code> setting.</p>
  </div> <!-- /WRAP -->
  </body>
</html>
 


DC log output shows:

I, [2012-03-21T08:43:09.227586 #20097]  INFO -- : New Aws::Ec2 using per_thread-connection
mode
I, [2012-03-21T08:43:09.238450 #20097]  INFO -- : Launching instance of image ami-8cc035e5
for AKIAJCBB265A57CGKR2Q, key: , groups: 
I, [2012-03-21T08:43:09.239199 #20097]  INFO -- : Opening new HTTPS connection to ec2.us-east-1.amazonaws.com:443
NoMethodError - undefined method `to_hash' for nil:NilClass:
	/home/rlandy/workspace/deltacloud/server/lib/deltacloud/helpers/conversion_helper.rb:29:in
`convert_to_json'
	/home/rlandy/workspace/deltacloud/server/lib/deltacloud/server.rb:498
	/home/rlandy/workspace/deltacloud/server/lib/sinatra/rack_accept.rb:89:in `call'
	/home/rlandy/workspace/deltacloud/server/lib/sinatra/rack_accept.rb:89:in `respond_to'
	/home/rlandy/workspace/deltacloud/server/lib/deltacloud/server.rb:492
	/home/rlandy/workspace/deltacloud/server/lib/sinatra/rabbit.rb:125:in `instance_eval'
	/home/rlandy/workspace/deltacloud/server/lib/sinatra/rabbit.rb:125:in `POST /api/instances'
	/usr/lib/ruby/gems/1.8/gems/sinatra-1.3.1/lib/sinatra/base.rb:1211:in `call'
	/usr/lib/ruby/gems/1.8/gems/sinatra-1.3.1/lib/sinatra/base.rb:1211:in `compile!'
	/usr/lib/ruby/gems/1.8/gems/sinatra-1.3.1/lib/sinatra/base.rb:772:in `[]'
	/usr/lib/ruby/gems/1.8/gems/sinatra-1.3.1/lib/sinatra/base.rb:772:in `route!'
	/usr/lib/ruby/gems/1.8/gems/sinatra-1.3.1/lib/sinatra/base.rb:788:in `route_eval'
	/usr/lib/ruby/gems/1.8/gems/sinatra-1.3.1/lib/sinatra/base.rb:772:in `route!'
	/usr/lib/ruby/gems/1.8/gems/sinatra-1.3.1/lib/sinatra/base.rb:821:in `process_route'
	/usr/lib/ruby/gems/1.8/gems/sinatra-1.3.1/lib/sinatra/base.rb:819:in `catch'
	/usr/lib/ruby/gems/1.8/gems/sinatra-1.3.1/lib/sinatra/base.rb:819:in `process_route'
	/usr/lib/ruby/gems/1.8/gems/sinatra-1.3.1/lib/sinatra/base.rb:771:in `route!'
	/usr/lib/ruby/gems/1.8/gems/sinatra-1.3.1/lib/sinatra/base.rb:770:in `each'
	/usr/lib/ruby/gems/1.8/gems/sinatra-1.3.1/lib/sinatra/base.rb:770:in `route!'
	/usr/lib/ruby/gems/1.8/gems/sinatra-1.3.1/lib/sinatra/base.rb:886:in `dispatch!'
	/usr/lib/ruby/gems/1.8/gems/sinatra-1.3.1/lib/sinatra/base.rb:706:in `call!'
	/usr/lib/ruby/gems/1.8/gems/sinatra-1.3.1/lib/sinatra/base.rb:871:in `invoke'
	/usr/lib/ruby/gems/1.8/gems/sinatra-1.3.1/lib/sinatra/base.rb:871:in `catch'
	/usr/lib/ruby/gems/1.8/gems/sinatra-1.3.1/lib/sinatra/base.rb:871:in `invoke'
	/usr/lib/ruby/gems/1.8/gems/sinatra-1.3.1/lib/sinatra/base.rb:706:in `call!'
	/usr/lib/ruby/gems/1.8/gems/sinatra-1.3.1/lib/sinatra/base.rb:692:in `call'
	/usr/lib/ruby/gems/1.8/gems/rack-1.3.5/lib/rack/commonlogger.rb:20:in `call'
	/home/rlandy/workspace/deltacloud/server/lib/sinatra/rack_date.rb:31:in `call'
	/home/rlandy/workspace/deltacloud/server/lib/sinatra/rack_accept.rb:152:in `call'
	/usr/lib/ruby/gems/1.8/gems/rack-protection-1.1.4/lib/rack/protection/xss_header.rb:22:in
`call'
	/usr/lib/ruby/gems/1.8/gems/rack-protection-1.1.4/lib/rack/protection/path_traversal.rb:16:in
`call'
	/usr/lib/ruby/gems/1.8/gems/rack-protection-1.1.4/lib/rack/protection/json_csrf.rb:17:in
`call'
	/usr/lib/ruby/gems/1.8/gems/rack-protection-1.1.4/lib/rack/protection/base.rb:47:in `call'
	/usr/lib/ruby/gems/1.8/gems/rack-protection-1.1.4/lib/rack/protection/xss_header.rb:22:in
`call'
	/usr/lib/ruby/gems/1.8/gems/rack-1.3.5/lib/rack/nulllogger.rb:9:in `call'
	/usr/lib/ruby/gems/1.8/gems/rack-1.3.5/lib/rack/head.rb:9:in `call'
	/usr/lib/ruby/gems/1.8/gems/sinatra-1.3.1/lib/sinatra/showexceptions.rb:21:in `call'
	/home/rlandy/workspace/deltacloud/server/lib/sinatra/rack_driver_select.rb:45:in `call'
	/home/rlandy/workspace/deltacloud/server/lib/sinatra/rack_matrix_params.rb:106:in `call'
	/home/rlandy/workspace/deltacloud/server/lib/sinatra/rack_runtime.rb:36:in `call'
	/home/rlandy/workspace/deltacloud/server/lib/sinatra/rack_etag.rb:41:in `call'
	/usr/lib/ruby/gems/1.8/gems/rack-accept-0.4.4/lib/rack/accept/context.rb:22:in `call'
	/usr/lib/ruby/gems/1.8/gems/rack-protection-1.1.4/lib/rack/protection/xss_header.rb:22:in
`call'
	/usr/lib/ruby/gems/1.8/gems/rack-protection-1.1.4/lib/rack/protection/path_traversal.rb:16:in
`call'
	/usr/lib/ruby/gems/1.8/gems/rack-protection-1.1.4/lib/rack/protection/json_csrf.rb:17:in
`call'
	/usr/lib/ruby/gems/1.8/gems/rack-protection-1.1.4/lib/rack/protection/base.rb:47:in `call'
	/usr/lib/ruby/gems/1.8/gems/rack-protection-1.1.4/lib/rack/protection/xss_header.rb:22:in
`call'
	/usr/lib/ruby/gems/1.8/gems/rack-1.3.5/lib/rack/logger.rb:15:in `call'
	/usr/lib/ruby/gems/1.8/gems/rack-1.3.5/lib/rack/commonlogger.rb:20:in `call'
	/usr/lib/ruby/gems/1.8/gems/rack-1.3.5/lib/rack/head.rb:9:in `call'
	/usr/lib/ruby/gems/1.8/gems/rack-1.3.5/lib/rack/methodoverride.rb:24:in `call'
	/usr/lib/ruby/gems/1.8/gems/sinatra-1.3.1/lib/sinatra/base.rb:1334:in `call'
	/usr/lib/ruby/gems/1.8/gems/sinatra-1.3.1/lib/sinatra/base.rb:1403:in `synchronize'
	/usr/lib/ruby/gems/1.8/gems/sinatra-1.3.1/lib/sinatra/base.rb:1334:in `call'
	/usr/lib/ruby/gems/1.8/gems/thin-1.3.1/lib/thin/connection.rb:80:in `pre_process'
	/usr/lib/ruby/gems/1.8/gems/thin-1.3.1/lib/thin/connection.rb:78:in `catch'
	/usr/lib/ruby/gems/1.8/gems/thin-1.3.1/lib/thin/connection.rb:78:in `pre_process'
	/usr/lib/ruby/gems/1.8/gems/eventmachine-0.12.10/lib/eventmachine.rb:1060:in `call'
	/usr/lib/ruby/gems/1.8/gems/eventmachine-0.12.10/lib/eventmachine.rb:1060:in `spawn_threadpool'
	/usr/lib/ruby/gems/1.8/gems/eventmachine-0.12.10/lib/eventmachine.rb:1057:in `initialize'
	/usr/lib/ruby/gems/1.8/gems/eventmachine-0.12.10/lib/eventmachine.rb:1057:in `new'
	/usr/lib/ruby/gems/1.8/gems/eventmachine-0.12.10/lib/eventmachine.rb:1057:in `spawn_threadpool'
	/usr/lib/ruby/gems/1.8/gems/eventmachine-0.12.10/lib/eventmachine.rb:1049:in `defer'
	/usr/lib/ruby/gems/1.8/gems/thin-1.3.1/lib/thin/connection.rb:50:in `process'
	/usr/lib/ruby/gems/1.8/gems/thin-1.3.1/lib/thin/connection.rb:38:in `receive_data'
	/usr/lib/ruby/gems/1.8/gems/eventmachine-0.12.10/lib/eventmachine.rb:256:in `run_machine'
	/usr/lib/ruby/gems/1.8/gems/eventmachine-0.12.10/lib/eventmachine.rb:256:in `run'
	/usr/lib/ruby/gems/1.8/gems/thin-1.3.1/lib/thin/backends/base.rb:61:in `start'
	/usr/lib/ruby/gems/1.8/gems/thin-1.3.1/lib/thin/server.rb:159:in `start'
	/usr/lib/ruby/gems/1.8/gems/thin-1.3.1/lib/thin/controllers/controller.rb:86:in `start'
	/usr/lib/ruby/gems/1.8/gems/thin-1.3.1/lib/thin/runner.rb:185:in `send'
	/usr/lib/ruby/gems/1.8/gems/thin-1.3.1/lib/thin/runner.rb:185:in `run_command'
	/usr/lib/ruby/gems/1.8/gems/thin-1.3.1/lib/thin/runner.rb:151:in `run!'
	./bin/deltacloudd:239
127.0.0.1 - - [21/Mar/2012 08:43:10] "POST /api/instances?format=json HTTP/1.1" 500 185386
0.9620

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

Mime
View raw message