• On Amazon Web Services
  • Launch an EC2 instance using Amazon Linux AMI 2014.03.1 - ami-fb8e9292 (64-bit)
  • Run my ansible script to configure the server for baking into an AMI
  • Run some Ruby that accesses an https:// url. It works fine.
  • Create the AMI from this image
  • Create a new instance from that AMI
  • Run the same Ruby
  • Expect it to work, got this error instead:

OpenSSL::SSL::SSLError: SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed>

  • The cert directories appear to be identical when I ls -l them side-by-side

How can I make the instance work as expected? Thank you.

  • Check is there's any difference testing the SSL certificate with openssl and going to one server or the other: echo -n | openssl s_client -ssl3 -connect google.com:443 -CApath /usr/share/ssl-cert (replace google.com with your hostnames) Apr 23 '14 at 16:02
  • As per my previous comment, google.com was just an example placeholder, don't use google.com and intead replace first with one server's hostname and run, then the other Apr 23 '14 at 16:29
  • I'm sorry I misunderstood. This machine isn't a server; it's a worker. It's failing on outbound https: connections. I'll update the question to remove the noise. Apr 23 '14 at 16:33

It seems AWS router tunnels SSLv3 outbound connection through TLS for older instances. Nevertheless it is recommended to switch to TLS:

  http = Net::HTTP.new(uri.host, uri.port)
  http.use_ssl = true
  http.ssl_version = :TLSv1

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.