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_connect returned=1 errno=0 state=error: certificate verify failed #38

Closed
asenchuk opened this issue Aug 28, 2017 · 1 comment
Closed

Comments

@asenchuk
Copy link

asenchuk commented Aug 28, 2017

Once I had had similar issue and resolved it by updating ruby to the 2.4.1 version (from brew). Now I'm trying to integrate S3 deployment and the aws_s3 command fails with the following stacktrace:

Seahorse::Client::NetworkingError: [!] SSL_connect returned=1 errno=0 state=error: certificate verify failed
  /usr/local/Cellar/ruby/2.4.1_1/lib/ruby/2.4.0/net/protocol.rb:44:in `connect_nonblock'
  /usr/local/Cellar/ruby/2.4.1_1/lib/ruby/2.4.0/net/protocol.rb:44:in `ssl_socket_connect'
  /usr/local/Cellar/ruby/2.4.1_1/lib/ruby/2.4.0/net/http.rb:948:in `connect'
  /usr/local/Cellar/ruby/2.4.1_1/lib/ruby/2.4.0/net/http.rb:887:in `do_start'
  /usr/local/Cellar/ruby/2.4.1_1/lib/ruby/2.4.0/net/http.rb:882:in `start'
  /usr/local/Cellar/ruby/2.4.1_1/lib/ruby/2.4.0/delegate.rb:83:in `method_missing'
  /usr/local/lib/ruby/gems/2.4.0/gems/aws-sdk-core-2.10.34/lib/seahorse/client/net_http/connection_pool.rb:285:in `start_session'
  /usr/local/lib/ruby/gems/2.4.0/gems/aws-sdk-core-2.10.34/lib/seahorse/client/net_http/connection_pool.rb:92:in `session_for'
  /usr/local/lib/ruby/gems/2.4.0/gems/aws-sdk-core-2.10.34/lib/seahorse/client/net_http/handler.rb:119:in `session'
  /usr/local/lib/ruby/gems/2.4.0/gems/aws-sdk-core-2.10.34/lib/seahorse/client/net_http/handler.rb:71:in `transmit'
  /usr/local/lib/ruby/gems/2.4.0/gems/aws-sdk-core-2.10.34/lib/seahorse/client/net_http/handler.rb:45:in `call'
  /usr/local/lib/ruby/gems/2.4.0/gems/aws-sdk-core-2.10.34/lib/seahorse/client/plugins/content_length.rb:12:in `call'
  /usr/local/lib/ruby/gems/2.4.0/gems/aws-sdk-core-2.10.34/lib/aws-sdk-core/plugins/s3_request_signer.rb:88:in `call'
  /usr/local/lib/ruby/gems/2.4.0/gems/aws-sdk-core-2.10.34/lib/aws-sdk-core/plugins/s3_request_signer.rb:23:in `call'
  /usr/local/lib/ruby/gems/2.4.0/gems/aws-sdk-core-2.10.34/lib/aws-sdk-core/plugins/s3_host_id.rb:14:in `call'
  /usr/local/lib/ruby/gems/2.4.0/gems/aws-sdk-core-2.10.34/lib/aws-sdk-core/xml/error_handler.rb:8:in `call'
  /usr/local/lib/ruby/gems/2.4.0/gems/aws-sdk-core-2.10.34/lib/aws-sdk-core/plugins/helpful_socket_errors.rb:10:in `call'
  /usr/local/lib/ruby/gems/2.4.0/gems/aws-sdk-core-2.10.34/lib/aws-sdk-core/plugins/s3_request_signer.rb:65:in `call'
  /usr/local/lib/ruby/gems/2.4.0/gems/aws-sdk-core-2.10.34/lib/aws-sdk-core/plugins/s3_redirects.rb:15:in `call'
  /usr/local/lib/ruby/gems/2.4.0/gems/aws-sdk-core-2.10.34/lib/aws-sdk-core/plugins/retry_errors.rb:89:in `call'
  /usr/local/lib/ruby/gems/2.4.0/gems/aws-sdk-core-2.10.34/lib/aws-sdk-core/plugins/retry_errors.rb:120:in `retry_request'
  /usr/local/lib/ruby/gems/2.4.0/gems/aws-sdk-core-2.10.34/lib/aws-sdk-core/plugins/retry_errors.rb:103:in `retry_if_possible'
  /usr/local/lib/ruby/gems/2.4.0/gems/aws-sdk-core-2.10.34/lib/aws-sdk-core/plugins/retry_errors.rb:91:in `call'
  /usr/local/lib/ruby/gems/2.4.0/gems/aws-sdk-core-2.10.34/lib/aws-sdk-core/plugins/retry_errors.rb:120:in `retry_request'
  /usr/local/lib/ruby/gems/2.4.0/gems/aws-sdk-core-2.10.34/lib/aws-sdk-core/plugins/retry_errors.rb:103:in `retry_if_possible'
  /usr/local/lib/ruby/gems/2.4.0/gems/aws-sdk-core-2.10.34/lib/aws-sdk-core/plugins/retry_errors.rb:91:in `call'
  /usr/local/lib/ruby/gems/2.4.0/gems/aws-sdk-core-2.10.34/lib/aws-sdk-core/plugins/retry_errors.rb:120:in `retry_request'
  /usr/local/lib/ruby/gems/2.4.0/gems/aws-sdk-core-2.10.34/lib/aws-sdk-core/plugins/retry_errors.rb:103:in `retry_if_possible'
  /usr/local/lib/ruby/gems/2.4.0/gems/aws-sdk-core-2.10.34/lib/aws-sdk-core/plugins/retry_errors.rb:91:in `call'
  /usr/local/lib/ruby/gems/2.4.0/gems/aws-sdk-core-2.10.34/lib/aws-sdk-core/plugins/s3_dualstack.rb:32:in `call'
  /usr/local/lib/ruby/gems/2.4.0/gems/aws-sdk-core-2.10.34/lib/aws-sdk-core/plugins/s3_accelerate.rb:49:in `call'
  /usr/local/lib/ruby/gems/2.4.0/gems/aws-sdk-core-2.10.34/lib/aws-sdk-core/plugins/s3_md5s.rb:31:in `call'
  /usr/local/lib/ruby/gems/2.4.0/gems/aws-sdk-core-2.10.34/lib/aws-sdk-core/plugins/s3_expect_100_continue.rb:21:in `call'
  /usr/local/lib/ruby/gems/2.4.0/gems/aws-sdk-core-2.10.34/lib/aws-sdk-core/plugins/s3_bucket_name_restrictions.rb:12:in `call'
  /usr/local/lib/ruby/gems/2.4.0/gems/aws-sdk-core-2.10.34/lib/aws-sdk-core/plugins/s3_bucket_dns.rb:31:in `call'
  /usr/local/lib/ruby/gems/2.4.0/gems/aws-sdk-core-2.10.34/lib/aws-sdk-core/rest/handler.rb:7:in `call'
  /usr/local/lib/ruby/gems/2.4.0/gems/aws-sdk-core-2.10.34/lib/aws-sdk-core/plugins/user_agent.rb:12:in `call'
  /usr/local/lib/ruby/gems/2.4.0/gems/aws-sdk-core-2.10.34/lib/seahorse/client/plugins/endpoint.rb:41:in `call'
  /usr/local/lib/ruby/gems/2.4.0/gems/aws-sdk-core-2.10.34/lib/aws-sdk-core/plugins/param_validator.rb:21:in `call'
  /usr/local/lib/ruby/gems/2.4.0/gems/aws-sdk-core-2.10.34/lib/seahorse/client/plugins/raise_response_errors.rb:14:in `call'
  /usr/local/lib/ruby/gems/2.4.0/gems/aws-sdk-core-2.10.34/lib/aws-sdk-core/plugins/s3_sse_cpk.rb:19:in `call'
  /usr/local/lib/ruby/gems/2.4.0/gems/aws-sdk-core-2.10.34/lib/aws-sdk-core/plugins/s3_dualstack.rb:24:in `call'
  /usr/local/lib/ruby/gems/2.4.0/gems/aws-sdk-core-2.10.34/lib/aws-sdk-core/plugins/s3_accelerate.rb:34:in `call'
  /usr/local/lib/ruby/gems/2.4.0/gems/aws-sdk-core-2.10.34/lib/aws-sdk-core/plugins/jsonvalue_converter.rb:20:in `call'
  /usr/local/lib/ruby/gems/2.4.0/gems/aws-sdk-core-2.10.34/lib/aws-sdk-core/plugins/idempotency_token.rb:18:in `call'
  /usr/local/lib/ruby/gems/2.4.0/gems/aws-sdk-core-2.10.34/lib/aws-sdk-core/plugins/param_converter.rb:20:in `call'
  /usr/local/lib/ruby/gems/2.4.0/gems/aws-sdk-core-2.10.34/lib/seahorse/client/plugins/response_target.rb:21:in `call'
  /usr/local/lib/ruby/gems/2.4.0/gems/aws-sdk-core-2.10.34/lib/seahorse/client/request.rb:70:in `send_request'
  /usr/local/lib/ruby/gems/2.4.0/gems/aws-sdk-core-2.10.34/lib/seahorse/client/base.rb:207:in `block (2 levels) in define_operation_methods'
  /usr/local/lib/ruby/gems/2.4.0/gems/aws-sdk-resources-2.10.34/lib/aws-sdk-resources/request.rb:24:in `call'
  /usr/local/lib/ruby/gems/2.4.0/gems/aws-sdk-resources-2.10.34/lib/aws-sdk-resources/operations.rb:41:in `call'
  /usr/local/lib/ruby/gems/2.4.0/gems/aws-sdk-resources-2.10.34/lib/aws-sdk-resources/operations.rb:87:in `call'
  /usr/local/lib/ruby/gems/2.4.0/gems/aws-sdk-resources-2.10.34/lib/aws-sdk-resources/operation_methods.rb:19:in `block in add_operation'
  /usr/local/lib/ruby/gems/2.4.0/gems/fastlane-plugin-aws_s3-1.0.0/lib/fastlane/plugin/aws_s3/actions/aws_s3_action.rb:413:in `upload_file'
  /usr/local/lib/ruby/gems/2.4.0/gems/fastlane-plugin-aws_s3-1.0.0/lib/fastlane/plugin/aws_s3/actions/aws_s3_action.rb:113:in `upload_ipa'
  /usr/local/lib/ruby/gems/2.4.0/gems/fastlane-plugin-aws_s3-1.0.0/lib/fastlane/plugin/aws_s3/actions/aws_s3_action.rb:87:in `run'
  /usr/local/lib/ruby/gems/2.4.0/gems/fastlane-2.53.1/fastlane/lib/fastlane/runner.rb:252:in `block (2 levels) in execute_action'
  /usr/local/lib/ruby/gems/2.4.0/gems/fastlane-2.53.1/fastlane/lib/fastlane/actions/actions_helper.rb:50:in `execute_action'
  /usr/local/lib/ruby/gems/2.4.0/gems/fastlane-2.53.1/fastlane/lib/fastlane/runner.rb:230:in `block in execute_action'
  /usr/local/lib/ruby/gems/2.4.0/gems/fastlane-2.53.1/fastlane/lib/fastlane/runner.rb:226:in `chdir'
  /usr/local/lib/ruby/gems/2.4.0/gems/fastlane-2.53.1/fastlane/lib/fastlane/runner.rb:226:in `execute_action'
  /usr/local/lib/ruby/gems/2.4.0/gems/fastlane-2.53.1/fastlane/lib/fastlane/runner.rb:148:in `trigger_action_by_name'
  /usr/local/lib/ruby/gems/2.4.0/gems/fastlane-2.53.1/fastlane/lib/fastlane/fast_file.rb:146:in `method_missing'
  Fastfile:34:in `block (2 levels) in parsing_binding'
  /usr/local/lib/ruby/gems/2.4.0/gems/fastlane-2.53.1/fastlane/lib/fastlane/lane.rb:33:in `call'
  /usr/local/lib/ruby/gems/2.4.0/gems/fastlane-2.53.1/fastlane/lib/fastlane/runner.rb:49:in `block in execute'
  /usr/local/lib/ruby/gems/2.4.0/gems/fastlane-2.53.1/fastlane/lib/fastlane/runner.rb:45:in `chdir'
  /usr/local/lib/ruby/gems/2.4.0/gems/fastlane-2.53.1/fastlane/lib/fastlane/runner.rb:45:in `execute'
  /usr/local/lib/ruby/gems/2.4.0/gems/fastlane-2.53.1/fastlane/lib/fastlane/lane_manager.rb:52:in `cruise_lane'
  /usr/local/lib/ruby/gems/2.4.0/gems/fastlane-2.53.1/fastlane/lib/fastlane/command_line_handler.rb:30:in `handle'
  /usr/local/lib/ruby/gems/2.4.0/gems/fastlane-2.53.1/fastlane/lib/fastlane/commands_generator.rb:104:in `block (2 levels) in run'
  /usr/local/lib/ruby/gems/2.4.0/gems/commander-fastlane-4.4.5/lib/commander/command.rb:178:in `call'
  /usr/local/lib/ruby/gems/2.4.0/gems/commander-fastlane-4.4.5/lib/commander/command.rb:153:in `run'
  /usr/local/lib/ruby/gems/2.4.0/gems/commander-fastlane-4.4.5/lib/commander/runner.rb:476:in `run_active_command'
  /usr/local/lib/ruby/gems/2.4.0/gems/fastlane-2.53.1/fastlane_core/lib/fastlane_core/ui/fastlane_runner.rb:64:in `run!'
  /usr/local/lib/ruby/gems/2.4.0/gems/commander-fastlane-4.4.5/lib/commander/delegates.rb:15:in `run!'
  /usr/local/lib/ruby/gems/2.4.0/gems/fastlane-2.53.1/fastlane/lib/fastlane/commands_generator.rb:303:in `run'
  /usr/local/lib/ruby/gems/2.4.0/gems/fastlane-2.53.1/fastlane/lib/fastlane/commands_generator.rb:42:in `start'
  /usr/local/lib/ruby/gems/2.4.0/gems/fastlane-2.53.1/fastlane/lib/fastlane/cli_tools_distributor.rb:66:in `take_off'
  /usr/local/lib/ruby/gems/2.4.0/gems/fastlane-2.53.1/bin/fastlane:20:in `<top (required)>'
  /usr/local/bin/fastlane:22:in `load'
  /usr/local/bin/fastlane:22:in `<top (required)>'
✅ fastlane environment ✅

Stack

Key Value
OS 10.12.6
Ruby 2.4.1
Bundler? true
Git git version 2.11.0 (Apple Git-81)
Installation Source /usr/local/bin/fastlane
Host Mac OS X 10.12.6 (16G29)
Ruby Lib Dir /usr/local/Cellar/ruby/2.4.1_1/lib
OpenSSL Version OpenSSL 1.0.2k 26 Jan 2017
Is contained false
Is homebrew false
Is installed via Fabric.app false
Xcode Path /Applications/Xcode.app/Contents/Developer/
Xcode Version 8.3.3

System Locale

Variable Value
LANG en_US.UTF-8
LC_ALL
LANGUAGE

fastlane files:

`./fastlane/Fastfile`
fastlane_version "2.53.1"

default_platform :ios

platform :ios do
  desc "Test upload"
  lane :test do
    aws_s3(
      access_key: "KEY",
      secret_access_key: "SECRET",
      ipa: "App.ipa",
      endpoint: "https://ENDPOINT.s3.amazonaws.com",
      bucket: "BUCKET",
      region: "us-east-1",
      app_directory: "builds/ios",
      path: "v{CFBundleShortVersionString}_b{CFBundleVersion}/",
      upload_metadata: true
    )
  end
end

fastlane gems

Gem Version Update-Status
fastlane 2.54.2 ✅ Up-To-Date

Loaded fastlane plugins:

Plugin Version Update-Status
fastlane-plugin-aws_s3 1.0.0 ✅ Up-To-Date
Loaded gems
Gem Version
did_you_mean 1.1.0
bundler 1.15.3
io-console 0.4.6
CFPropertyList 2.3.5
i18n 0.8.6
minitest 5.10.1
thread_safe 0.3.6
tzinfo 1.2.3
activesupport 4.2.9
public_suffix 3.0.0
addressable 2.5.2
rubyzip 1.2.1
apktools 0.7.2
aws-sigv4 1.0.1
jmespath 1.3.1
aws-sdk-core 2.10.34
aws-sdk-resources 2.10.34
aws-sdk 2.10.34
babosa 1.0.2
claide 1.0.2
fuzzy_match 2.0.4
nap 1.1.0
cocoapods-core 1.3.1
cocoapods-deintegrate 1.0.1
cocoapods-downloader 1.1.3
cocoapods-plugins 1.0.0
cocoapods-search 1.0.0
cocoapods-stats 1.0.0
netrc 0.7.8
cocoapods-trunk 1.2.0
cocoapods-try 1.1.0
colored2 3.1.2
escape 0.0.4
fourflusher 2.0.1
gh_inspector 1.0.3
molinillo 0.5.7
ruby-macho 1.1.0
nanaimo 0.2.3
xcodeproj 1.5.1
cocoapods 1.3.1
colored 1.2
highline 1.7.8
commander-fastlane 4.4.5
declarative 0.0.9
declarative-option 0.1.0
unf_ext 0.0.7.4
unf 0.1.4
domain_name 0.5.20170404
dotenv 2.2.1
excon 0.58.0
multipart-post 2.0.0
faraday 0.13.1
http-cookie 1.0.3
faraday-cookie_jar 0.0.6
faraday_middleware 0.12.2
fastimage 2.1.0
jwt 1.5.6
little-plugger 1.1.4
multi_json 1.12.1
logging 2.2.2
memoist 0.16.0
os 0.9.6
signet 0.7.3
googleauth 0.5.3
httpclient 2.8.3
mime-types-data 3.2016.0521
mime-types 3.1
uber 0.1.0
representable 3.0.4
retriable 3.1.1
google-api-client 0.13.4
json 2.1.0
mini_magick 4.5.1
multi_xml 0.6.0
plist 3.3.0
security 0.1.3
slack-notifier 1.5.1
terminal-notifier 1.8.0
unicode-display_width 1.3.0
terminal-table 1.8.0
tty-screen 0.5.0
word_wrap 1.0.0
rouge 2.0.7
xcpretty 0.2.8
xcpretty-travis-formatter 0.0.4
fastlane-plugin-aws_s3 1.0.0

generated on: 2017-08-28


I have no clue why it happens since I have the latest ruby and openssl.

Here's related issue in the aws-sdk-core-ruby repo: amazon-archives/aws-sdk-core-ruby#166
They suggest force using bundled CA cert by adding specific directive that's normally impossible in my case. I hope I'm not the only who faces this issue so there might be a general solution.

Any ideas?

@asenchuk
Copy link
Author

My bad, the reason was in wrong aws_s3 command configuration. Sorry I didn't add this update at once I understood it.

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

1 participant