0

I've recently run into an error when I try to deploy my AWS servers where Excon is no longer able to find my ssl certificates. The following error is what I get:

/Users/Jacob/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/excon-0.32.1/lib/excon/ssl_socket.rb:101:in `connect_nonblock': Unable to verify certificate, please set `Excon.defaults[:ssl_ca_path] = path_to_certs`, `ENV['SSL_CERT_DIR'] = path_to_certs`, `Excon.defaults[:ssl_ca_file] = path_to_file`, `ENV['SSL_CERT_FILE'] = path_to_file` or `Excon.defaults[:ssl_verify_peer] = false` (less secure). (Excon::Errors::SocketError)
from /Users/Jacob/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/excon-0.32.1/lib/excon/ssl_socket.rb:101:in `block in initialize'
from /Users/Jacob/.rbenv/versions/2.1.0/lib/ruby/2.1.0/timeout.rb:82:in `block in timeout'
from /Users/Jacob/.rbenv/versions/2.1.0/lib/ruby/2.1.0/timeout.rb:70:in `catch'
from /Users/Jacob/.rbenv/versions/2.1.0/lib/ruby/2.1.0/timeout.rb:70:in `timeout'
from /Users/Jacob/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/excon-0.32.1/lib/excon/ssl_socket.rb:97:in `initialize'
from /Users/Jacob/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/excon-0.32.1/lib/excon/connection.rb:410:in `new'
from /Users/Jacob/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/excon-0.32.1/lib/excon/connection.rb:410:in `socket'
from /Users/Jacob/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/excon-0.32.1/lib/excon/connection.rb:122:in `request_call'
from /Users/Jacob/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/excon-0.32.1/lib/excon/middlewares/mock.rb:42:in `request_call'
from /Users/Jacob/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/excon-0.32.1/lib/excon/middlewares/instrumentor.rb:22:in `request_call'
from /Users/Jacob/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/excon-0.32.1/lib/excon/middlewares/base.rb:15:in `request_call'
from /Users/Jacob/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/excon-0.32.1/lib/excon/middlewares/base.rb:15:in `request_call'
from /Users/Jacob/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/excon-0.32.1/lib/excon/middlewares/base.rb:15:in `request_call'
from /Users/Jacob/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/excon-0.32.1/lib/excon/connection.rb:265:in `request'
from /Users/Jacob/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/excon-0.32.1/lib/excon/middlewares/idempotent.rb:12:in `error_call'
from /Users/Jacob/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/excon-0.32.1/lib/excon/middlewares/base.rb:10:in `error_call'
from /Users/Jacob/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/excon-0.32.1/lib/excon/middlewares/base.rb:10:in `error_call'
from /Users/Jacob/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/excon-0.32.1/lib/excon/connection.rb:288:in `rescue in request'
from /Users/Jacob/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/excon-0.32.1/lib/excon/connection.rb:225:in `request'
from /Users/Jacob/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/excon-0.32.1/lib/excon/middlewares/idempotent.rb:12:in `error_call'
from /Users/Jacob/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/excon-0.32.1/lib/excon/middlewares/base.rb:10:in `error_call'
from /Users/Jacob/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/excon-0.32.1/lib/excon/middlewares/base.rb:10:in `error_call'
from /Users/Jacob/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/excon-0.32.1/lib/excon/connection.rb:288:in `rescue in request'
from /Users/Jacob/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/excon-0.32.1/lib/excon/connection.rb:225:in `request'
from /Users/Jacob/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/excon-0.32.1/lib/excon/middlewares/idempotent.rb:12:in `error_call'
from /Users/Jacob/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/excon-0.32.1/lib/excon/middlewares/base.rb:10:in `error_call'
from /Users/Jacob/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/excon-0.32.1/lib/excon/middlewares/base.rb:10:in `error_call'
from /Users/Jacob/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/excon-0.32.1/lib/excon/connection.rb:288:in `rescue in request'
from /Users/Jacob/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/excon-0.32.1/lib/excon/connection.rb:225:in `request'
from /Users/Jacob/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/fog-1.21.0/lib/fog/xml/sax_parser_connection.rb:36:in `request'
from /Users/Jacob/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/fog-1.21.0/lib/fog/xml.rb:22:in `request'
from /Users/Jacob/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/fog-1.21.0/lib/fog/aws/compute.rb:447:in `_request'
from /Users/Jacob/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/fog-1.21.0/lib/fog/aws/compute.rb:442:in `request'
from /Users/Jacob/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/fog-1.21.0/lib/fog/aws/requests/compute/describe_security_groups.rb:39:in `describe_security_groups'
from /Users/Jacob/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/fog-1.21.0/lib/fog/aws/models/compute/security_groups.rb:66:in `all'
from /Users/Jacob/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/rubber-2.7.3/lib/rubber/cloud/aws.rb:268:in `describe_security_groups'
from /Users/Jacob/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/rubber-2.7.3/lib/rubber/cloud/aws.rb:404:in `sync_security_groups'
from /Users/Jacob/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/rubber-2.7.3/lib/rubber/cloud/aws.rb:260:in `setup_security_groups'
from /Users/Jacob/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/rubber-2.7.3/lib/rubber/cloud/aws.rb:75:in `before_create_instance'
from /Users/Jacob/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/rubber-2.7.3/lib/rubber/thread_safe_proxy.rb:13:in `method_missing'
from /Users/Jacob/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/rubber-2.7.3/lib/rubber/recipes/rubber/instances.rb:267:in `block in create_instance'
from /Users/Jacob/.rbenv/versions/2.1.0/lib/ruby/2.1.0/monitor.rb:211:in `mon_synchronize'
from /Users/Jacob/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/rubber-2.7.3/lib/rubber/recipes/rubber/instances.rb:266:in `create_instance'
from /Users/Jacob/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/rubber-2.7.3/lib/rubber/recipes/rubber/instances.rb:230:in `block (2 levels) in create_instances'

I've tried deleting my openssl.conf file as suggested in this similar thread:

Excon not recognising my SSL route

but the same error still appears

Let me know if there is any other information I could provide to be helpful.

Community
  • 1
  • 1
  • Have you modified openssl on that machine at all? ie added anything via homebrew? I haven't worked on a maverick machine personally, but I haven't heard a report of this sort yet either, so just trying to narrow things down a bit. – geemus Apr 01 '14 at 12:59
  • I installed several different programs using homebrew when I first set the computer up (rbenv, ImageMagick, and PostgreSQL come to mind, but there could have been a few others). Apart from that I haven't knowingly modified openssl in anyway. Is there a way I could check the state of openssl and post that here for you? – j_will93 Apr 02 '14 at 15:18
  • brew install/update openssl might help? Not sure though. – geemus Apr 03 '14 at 15:54
  • Running brew upgrade or brew install openssl just returns an error saying that openssl-1.0.1f is already installed. – j_will93 Apr 04 '14 at 16:02
  • Hmm, I seem to have fixed my problem unintentionally while setting up some iOS dev stuff. I added a certificate for my iOS developer account and now everything seems to be working normally. Not exactly sure why this happened, but it seems like it may have been largely due to my setup rather than anything related to fog or excon. Thanks for your help anyway! – j_will93 Apr 04 '14 at 17:47
  • Yeah, sure thing. Thanks for the update. – geemus Apr 07 '14 at 14:26
  • Hmm, it seems my problem wasn't completely fixed. I'm still running into the same error when running some other commands. I looked into updates that are present in mavericks and found the following bit of information: http://curl.haxx.se/mail/archive-2013-10/0036.html It seems like Mavericks using a different version of openssl could certainly affect things, but I'm still not sure what a viable work around could be. Any thoughts? – j_will93 Apr 07 '14 at 15:24
  • I also noticed in one of your github issues for excon (after the update from 0.24 to 0.25) there was a similar issue where you asked someone to run: 'ruby -e "require('openssl'); puts(OpenSSL::Config::DEFAULT_CONFIG_FILE)"' as a trouble shooting step. In case it is helpful that returns: /usr/local/etc/openssl/openssl.cnf with no certificate= portion for me. – j_will93 Apr 07 '14 at 15:27
  • Other strange behavior: inside of rails console I can require Excon and then get a response from https://github.com without any issue, but the exact same commands inside of irb fail. – j_will93 Apr 07 '14 at 17:21
  • That is strange. Is it the same version of Ruby in both cases? – geemus Apr 08 '14 at 13:26

0 Answers0