我在這裏看到很多答案,但他們都沒有工作。我使用omniauth-oauth2 gem與第三方客戶集成。SSL_connect SYSCALL返回= 5 errno = 0 state = SSLv2/v3讀取服務器hello A - Faraday :: Error :: ConnectionFailed
我使用的是安裝階段描述here但我總是收到此錯誤:
Authentication failure! failed_to_connect: Faraday::Error::ConnectionFailed, SSL_connect SYSCALL returned=5 errno=0 state=SSLv2/v3 read server hello A
Faraday::Error::ConnectionFailed (SSL_connect SYSCALL returned=5 errno=0 state=SSLv2/v3 read server hello A):
.rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/net/http.rb:918:in `connect'
.rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/net/http.rb:918:in `block in connect'
我在config/initializers
初始化是:
Rails.application.config.middleware.use OmniAuth::Builder do
client_id = 'my_client_id'
client_secret = 'secret'
ca_file = Rails.root.join('config', 'cacert.pem').to_s
ssl_options = {}
ssl_options[:ca_path] = '/usr/local/etc/openssl'
ssl_options[:ca_file] = ca_file
provider :my_partner_provider, client_id, client_secret, :client_options => {:ssl => ssl_options},
setup: ->(env){
req = Rack::Request.new(env)
site = "https://#{req.params.fetch('shop')}"
env['omniauth.strategy'].options[:client_options][:site] = site
}
end
我有和無SSL嘗試選項。
爲補充,這裏是我的籌碼:https://gist.github.com/cleytonmessias/11274209
我鍵入終端openssl s_client -showcerts -connect partnerurl.com:443 <<<OK
並返回此:https://gist.github.com/cleytonmessias/11288646
有誰知道解決這個問題?
你有沒有找到任何解決辦法? –
我想說這是一個錯誤,但它可能不是來自Net :: HTTP。連接到Sharepoint服務時,我遇到了這個問題:wget也無法連接,而curl完全沒有問題。 – Michael
但你解決了嗎?我仍然沒有找到任何東西。 – Cleyton