Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SSL Error on S3 connection #9

Closed
plribeiro3000 opened this issue Jan 15, 2015 · 4 comments
Closed

SSL Error on S3 connection #9

plribeiro3000 opened this issue Jan 15, 2015 · 4 comments

Comments

@plribeiro3000
Copy link
Member

Original issue at: fog/fog#3075

I'm getting an error with S3 at the moment. If I set up a connection (using my key + secret, eu-west-1) such that connection is an instance of Fog::Storage::AWS::Real, then do

puts connection.directories.to_a, I get an array of directory objects, as expected.

However, if I try:

p connection.directories.to_a or puts connection.directories

I get the error details in the below trace, after a long delay.

Any idea why this is happening?

/home/iain/.gem/ruby/2.1.0/gems/excon-0.38.0/lib/excon/ssl_socket.rb:105:in `connect_nonblock': SSL_connect SYSCALL returned=5 errno=0 state=SSLv2/v3 read server hello A (OpenSSL::SSL::SSLError) (Excon::Errors::SocketError)
    from /home/iain/.gem/ruby/2.1.0/gems/excon-0.38.0/lib/excon/ssl_socket.rb:105:in `block in initialize'
    from /usr/lib/ruby/2.1.0/timeout.rb:91:in `block in timeout'
    from /usr/lib/ruby/2.1.0/timeout.rb:35:in `block in catch'
    from /usr/lib/ruby/2.1.0/timeout.rb:35:in `catch'
    from /usr/lib/ruby/2.1.0/timeout.rb:35:in `catch'
    from /usr/lib/ruby/2.1.0/timeout.rb:106:in `timeout'
    from /home/iain/.gem/ruby/2.1.0/gems/excon-0.38.0/lib/excon/ssl_socket.rb:101:in `initialize'
    from /home/iain/.gem/ruby/2.1.0/gems/excon-0.38.0/lib/excon/connection.rb:414:in `new'
    from /home/iain/.gem/ruby/2.1.0/gems/excon-0.38.0/lib/excon/connection.rb:414:in `socket'
    from /home/iain/.gem/ruby/2.1.0/gems/excon-0.38.0/lib/excon/connection.rb:126:in `request_call'
    from /home/iain/.gem/ruby/2.1.0/gems/excon-0.38.0/lib/excon/middlewares/mock.rb:44:in `request_call'
    from /home/iain/.gem/ruby/2.1.0/gems/excon-0.38.0/lib/excon/middlewares/instrumentor.rb:22:in `request_call'
    from /home/iain/.gem/ruby/2.1.0/gems/excon-0.38.0/lib/excon/middlewares/base.rb:15:in `request_call'
    from /home/iain/.gem/ruby/2.1.0/gems/excon-0.38.0/lib/excon/middlewares/base.rb:15:in `request_call'
    from /home/iain/.gem/ruby/2.1.0/gems/excon-0.38.0/lib/excon/middlewares/base.rb:15:in `request_call'
    from /home/iain/.gem/ruby/2.1.0/gems/excon-0.38.0/lib/excon/connection.rb:269:in `request'
    from /home/iain/.gem/ruby/2.1.0/gems/excon-0.38.0/lib/excon/middlewares/idempotent.rb:12:in `error_call'
    from /home/iain/.gem/ruby/2.1.0/gems/excon-0.38.0/lib/excon/middlewares/base.rb:10:in `error_call'
    from /home/iain/.gem/ruby/2.1.0/gems/excon-0.38.0/lib/excon/middlewares/base.rb:10:in `error_call'
    from /home/iain/.gem/ruby/2.1.0/gems/excon-0.38.0/lib/excon/connection.rb:292:in `rescue in request'
    from /home/iain/.gem/ruby/2.1.0/gems/excon-0.38.0/lib/excon/connection.rb:229:in `request'
    from /home/iain/.gem/ruby/2.1.0/gems/excon-0.38.0/lib/excon/middlewares/idempotent.rb:12:in `error_call'
    from /home/iain/.gem/ruby/2.1.0/gems/excon-0.38.0/lib/excon/middlewares/base.rb:10:in `error_call'
    from /home/iain/.gem/ruby/2.1.0/gems/excon-0.38.0/lib/excon/middlewares/base.rb:10:in `error_call'
    from /home/iain/.gem/ruby/2.1.0/gems/excon-0.38.0/lib/excon/connection.rb:292:in `rescue in request'
    from /home/iain/.gem/ruby/2.1.0/gems/excon-0.38.0/lib/excon/connection.rb:229:in `request'
    from /home/iain/.gem/ruby/2.1.0/gems/excon-0.38.0/lib/excon/middlewares/idempotent.rb:12:in `error_call'
    from /home/iain/.gem/ruby/2.1.0/gems/excon-0.38.0/lib/excon/middlewares/base.rb:10:in `error_call'
    from /home/iain/.gem/ruby/2.1.0/gems/excon-0.38.0/lib/excon/middlewares/base.rb:10:in `error_call'
    from /home/iain/.gem/ruby/2.1.0/gems/excon-0.38.0/lib/excon/connection.rb:292:in `rescue in request'
    from /home/iain/.gem/ruby/2.1.0/gems/excon-0.38.0/lib/excon/connection.rb:229:in `request'
    from /home/iain/.gem/ruby/2.1.0/gems/fog-1.23.0/lib/fog/xml/sax_parser_connection.rb:35:in `request'
    from /home/iain/.gem/ruby/2.1.0/gems/fog-1.23.0/lib/fog/xml/connection.rb:17:in `request'
    from /home/iain/.gem/ruby/2.1.0/gems/fog-1.23.0/lib/fog/aws/storage.rb:535:in `request'
    from /home/iain/.gem/ruby/2.1.0/gems/fog-1.23.0/lib/fog/aws/requests/storage/get_service.rb:21:in `get_service'
    from /home/iain/.gem/ruby/2.1.0/gems/fog-1.23.0/lib/fog/aws/models/storage/directories.rb:11:in `all'
    from /home/iain/.gem/ruby/2.1.0/gems/fog-core-1.23.0/lib/fog/core/collection.rb:139:in `lazy_load'
    from /home/iain/.gem/ruby/2.1.0/gems/fog-core-1.23.0/lib/fog/core/collection.rb:15:in `empty?'
    from /home/iain/.gem/ruby/2.1.0/gems/fog-core-1.23.0/lib/fog/core/collection.rb:84:in `block in inspect'
    from /home/iain/.gem/ruby/2.1.0/gems/formatador-0.2.5/lib/formatador.rb:92:in `indent'
    from /home/iain/.gem/ruby/2.1.0/gems/fog-core-1.23.0/lib/fog/core/collection.rb:77:in `inspect'
@plribeiro3000
Copy link
Member Author

cc/ @iaingray @starbelly

@ghost
Copy link

ghost commented Jan 15, 2015

Right, so I'm having success with replacing Timeout.timeout with setting the timeouts on the socket itself. This is actually quite simple, I thought I was going to be writing an extension. Anyway, only 18 excon test fail with this implementation and I think this is because the exception handling is not properly worked out. Also, I think some are failing for unrelated reasons as well. Definitely not ready to do a PR on this, but you can checkout the branch for now : https://github.com/starbelly/excon/tree/fix_timeouts

@ghost
Copy link

ghost commented Jan 15, 2015

So, 16 tests fail in for excon/master on my box, so definitely on the right track. The two tests that are failing for me in my branch are the timeout tests! HA! Though, it's because a response js given back when a timeout exception is expected, which is odd. Once again, I'm pretty positive that's do to improper exception handling in my branch right now. Right, so probably shouldn't be talking about this in fog-aws anymore since this is all excon related. @geemus I may need a little help with those two failing tests.

EDIT: Nevermind @geemus, I see that the timeouts are simply not working. Fsck! And so I forge on...

Edit : Scratch that, works, but not with readline... Need to re-implement Excon::Socket.readline without using readline. That's enough for today : )

Edit: Can do a PR now. In the end I just re-worked things to work with IO.select, no setting the timeout on the socket ( as I learned this is futile ). All test pass on my machine.

@geemus
Copy link
Member

geemus commented Jan 18, 2015

Sure thing. I'm going to close this issue and continue discussion over on the other stuff, thanks!

@geemus geemus closed this as completed Jan 18, 2015
KevinLoiseau added a commit to KevinLoiseau/fog-aws that referenced this issue Oct 23, 2019
…ttributes_to_hosted_zone_parsers

Enhance/sd 9089/add some attributes to hosted zone parsers
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants