From: Jason Guiditta <jason.guiditta@gmail.com>
To: deltacloud-users@lists.fedorahosted.org
Sent: Tue, September 21, 2010 5:18:52 PM
Subject: Re: EC2 provider credentials

On Tue, Sep 21, 2010 at 8:04 PM, Xavier J <xavierj08@yahoo.com> wrote:

Hello all,
    I have all the DC components installed (finally.. :). I started the services and I can access the mock API interface and the aggregator interface. 

    Now, I installed EC2 driver and trying to add a provider. As brief guide at http://deltacloud.org/drivers.html#h2_1 suggests, I trying to use my Ec2 credentials to complete the "add provider" step, but it always says "The entered credential information is incorrect". I am entering my EC2 access key and secret key. I also tried my amazon username/passwd but none worked. I have set the proxy as well. Anything else I'm missing?

Thanks
~x 


Are you running the core server with deltacloudd -i ec2? If so, try going directly to http://localhost:3001/api and attempt login there to verify that level of functionality. 


Okay.. I managed to forward the port and now the browser from a windows machine prompts HTTP credentials when I try to GET /api/images. But when I supply my Ec2 credentials (access key and secret key) it waits for some time and throws internal error. Please see the logs below. I tried GoGrid driver and I get the same error. It looks like a connect timeout. But I don't have any connectivity problems(proxy etc). 

Please shed some light. Sorry for posting the log :)

Starting Deltacloud API :: ec2 :: http://localhost:3001/api


02:05:09 - Src Launched
>> Thin web server (v1.2.5 codename This Is Not A Web Server)
>> Debugging ON
>> Maximum connections set to 1024
>> Listening on localhost:3001, CTRL+C to stop
Watching /usr/lib/ruby/gems/1.8/gems/deltacloud-core-0.0.6/**/*.{rb,js,css,erb}
127.0.0.1 - - [21/Sep/2010 02:05:16] "GET /api HTTP/1.1" 200 829 0.1136
127.0.0.1 - - [21/Sep/2010 02:05:36] "GET /api/images HTTP/1.1" 401 15 0.0030
Errno::ETIMEDOUT - Connection timed out - connect(2):
 /usr/lib/ruby/1.8/net/http.rb:560:in `initialize'
 /usr/lib/ruby/1.8/net/http.rb:560:in `open'
 /usr/lib/ruby/1.8/net/http.rb:560:in `connect'
 /usr/lib/ruby/1.8/timeout.rb:53:in `timeout'
 /usr/lib/ruby/1.8/timeout.rb:93:in `timeout'
 /usr/lib/ruby/1.8/net/http.rb:560:in `connect'
 /usr/lib/ruby/1.8/net/http.rb:553:in `do_start'
 /usr/lib/ruby/1.8/net/http.rb:542:in `start'
 /usr/lib/ruby/gems/1.8/gems/amazon-ec2-0.9.15/lib/AWS.rb:233:in `make_request'
 /usr/lib/ruby/gems/1.8/gems/amazon-ec2-0.9.15/lib/AWS.rb:283:in `response_generator'
 /usr/lib/ruby/gems/1.8/gems/amazon-ec2-0.9.15/lib/AWS/EC2/images.rb:143:in `describe_images'
 ./lib/deltacloud/drivers/ec2/ec2_driver.rb:130:in `images'
 ./lib/deltacloud/base_driver/base_driver.rb:214:in `call'
 ./lib/deltacloud/base_driver/base_driver.rb:214:in `safely'
 ./lib/deltacloud/drivers/ec2/ec2_driver.rb:129:in `images'
 ./lib/deltacloud/helpers/application_helper.rb:65:in `send'
 ./lib/deltacloud/helpers/application_helper.rb:65:in `filter_all'
 ./server.rb:108
 ./lib/sinatra/rabbit.rb:62:in `instance_eval'
 ./lib/sinatra/rabbit.rb:62:in `GET /api/images'
 /usr/lib/ruby/gems/1.8/gems/sinatra-1.0/lib/sinatra/base.rb:863:in `call'
 /usr/lib/ruby/gems/1.8/gems/sinatra-1.0/lib/sinatra/base.rb:863:in `route'
 /usr/lib/ruby/gems/1.8/gems/sinatra-1.0/lib/sinatra/base.rb:521:in `instance_eval'
 /usr/lib/ruby/gems/1.8/gems/sinatra-1.0/lib/sinatra/base.rb:521:in `route_eval'
 /usr/lib/ruby/gems/1.8/gems/sinatra-1.0/lib/sinatra/base.rb:500:in `route!'
 /usr/lib/ruby/gems/1.8/gems/sinatra-1.0/lib/sinatra/base.rb:497:in `catch'
 /usr/lib/ruby/gems/1.8/gems/sinatra-1.0/lib/sinatra/base.rb:497:in `route!'
 /usr/lib/ruby/gems/1.8/gems/sinatra-1.0/lib/sinatra/base.rb:476:in `each'
 /usr/lib/ruby/gems/1.8/gems/sinatra-1.0/lib/sinatra/base.rb:476:in `route!'
 /usr/lib/ruby/gems/1.8/gems/sinatra-1.0/lib/sinatra/base.rb:601:in `dispatch!'
 /usr/lib/ruby/gems/1.8/gems/sinatra-1.0/lib/sinatra/base.rb:411:in `call!'
 /usr/lib/ruby/gems/1.8/gems/sinatra-1.0/lib/sinatra/base.rb:566:in `instance_eval'
 /usr/lib/ruby/gems/1.8/gems/sinatra-1.0/lib/sinatra/base.rb:566:in `invoke'
 /usr/lib/ruby/gems/1.8/gems/sinatra-1.0/lib/sinatra/base.rb:566:in `catch'
 /usr/lib/ruby/gems/1.8/gems/sinatra-1.0/lib/sinatra/base.rb:566:in `invoke'
 /usr/lib/ruby/gems/1.8/gems/sinatra-1.0/lib/sinatra/base.rb:411:in `call!'
 /usr/lib/ruby/gems/1.8/gems/sinatra-1.0/lib/sinatra/base.rb:399:in `call'
 /usr/lib/ruby/gems/1.8/gems/rack-1.1.0/lib/rack/methodoverride.rb:24:in `call'
 /usr/lib/ruby/gems/1.8/gems/rack-1.1.0/lib/rack/commonlogger.rb:18:in `call'
 /usr/lib/ruby/gems/1.8/gems/sinatra-1.0/lib/sinatra/base.rb:979:in `call'
 /usr/lib/ruby/gems/1.8/gems/sinatra-1.0/lib/sinatra/base.rb:1005:in `synchronize'
 /usr/lib/ruby/gems/1.8/gems/sinatra-1.0/lib/sinatra/base.rb:979:in `call'
 /usr/lib/ruby/gems/1.8/gems/thin-1.2.5/lib/thin/stats.rb:24:in `call'
 /usr/lib/ruby/gems/1.8/gems/thin-1.2.5/lib/thin/stats.rb:33:in `log'
 /usr/lib/ruby/gems/1.8/gems/thin-1.2.5/lib/thin/stats.rb:24:in `call'
 /usr/lib/ruby/gems/1.8/gems/thin-1.2.5/lib/thin/connection.rb:76:in `pre_process'
 /usr/lib/ruby/gems/1.8/gems/thin-1.2.5/lib/thin/connection.rb:74:in `catch'
 /usr/lib/ruby/gems/1.8/gems/thin-1.2.5/lib/thin/connection.rb:74: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.2.5/lib/thin/connection.rb:54:in `process'
 /usr/lib/ruby/gems/1.8/gems/thin-1.2.5/lib/thin/connection.rb:42: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.2.5/lib/thin/backends/base.rb:57:in `start'
 /usr/lib/ruby/gems/1.8/gems/thin-1.2.5/lib/thin/server.rb:156:in `start'
 /usr/lib/ruby/gems/1.8/gems/thin-1.2.5/lib/thin/controllers/controller.rb:80:in `start'
 /usr/lib/ruby/gems/1.8/gems/thin-1.2.5/lib/thin/runner.rb:177:in `send'
 /usr/lib/ruby/gems/1.8/gems/thin-1.2.5/lib/thin/runner.rb:177:in `run_command'
 /usr/lib/ruby/gems/1.8/gems/thin-1.2.5/lib/thin/runner.rb:143:in `run!'
 /usr/lib/ruby/gems/1.8/gems/thin-1.2.5/bin/thin:6
 /usr/bin/thin:19:in `load'
 /usr/bin/thin:19
127.0.0.1 - - [21/Sep/2010 02:06:13] "GET /api/images HTTP/1.1" 500 30 21.3593