Rails omniauth facebook SSL handshake failure

浪尽此生 提交于 2020-01-05 07:31:08

问题


My app has been running fine for months, and all of a sudden logging in just doesn't work, i get this:

2014-10-18T18:09:33.971670+00:00 app[web.1]: Faraday::SSLError (SSL_connect returned=1 errno=0 state=SSLv3 read server hello A: sslv3 alert handshake failure): 2014-10-18T18:09:33.971672+00:00 app[web.1]: vendor/ruby-2.0.0/lib/ruby/2.0.0/net/http.rb:918:in `connect' 2014-10-18T18:09:33.971674+00:00 app[web.1]: vendor/ruby-2.0.0/lib/ruby/2.0.0/net/http.rb:918:in `block in connect' 2014-10-18T18:09:33.971675+00:00 app[web.1]: vendor/ruby-2.0.0/lib/ruby/2.0.0/timeout.rb:52:in `timeout' 2014-10-18T18:09:33.971676+00:00 app[web.1]: vendor/ruby-2.0.0/lib/ruby/2.0.0/net/http.rb:918:in `connect' 2014-10-18T18:09:33.971678+00:00 app[web.1]: vendor/ruby-2.0.0/lib/ruby/2.0.0/net/http.rb:862:in `do_start' 2014-10-18T18:09:33.971679+00:00 app[web.1]: vendor/ruby-2.0.0/lib/ruby/2.0.0/net/http.rb:851:in `start' 2014-10-18T18:09:33.971680+00:00 app[web.1]: vendor/ruby-2.0.0/lib/ruby/2.0.0/net/http.rb:1367:in `request' 2014-10-18T18:09:33.971682+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/newrelic_rpm-3.8.1.221/lib/new_relic/agent/instrumentation/net.rb:27:in `block (2 leve ls) in request_with_newrelic_trace' 2014-10-18T18:09:33.971683+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/newrelic_rpm-3.8.1.221/lib/new_relic/agent.rb:404:in `disable_all_tracing' 2014-10-18T18:09:33.971685+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/newrelic_rpm-3.8.1.221/lib/new_relic/agent/instrumentation/net.rb:26:in `block in requ est_with_newrelic_trace' 2014-10-18T18:09:33.971686+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/newrelic_rpm-3.8.1.221/lib/new_relic/agent/cross_app_tracing.rb:41:in `trace_http_requ est' 2014-10-18T18:09:33.971687+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/newrelic_rpm-3.8.1.221/lib/new_relic/agent/instrumentation/net.rb:23:in `request_with_ newrelic_trace' 2014-10-18T18:09:33.971689+00:00 app[web.1]: vendor/ruby-2.0.0/lib/ruby/2.0.0/net/http.rb:1126:in `get' 2014-10-18T18:09:33.971690+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/faraday-0.9.0/lib/faraday/adapter/net_http.rb:78:in `perform_request' 2014-10-18T18:09:33.971691+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/faraday-0.9.0/lib/faraday/adapter/net_http.rb:39:in `call' 2014-10-18T18:09:33.971693+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/faraday-0.9.0/lib/faraday/request/url_encoded.rb:15:in `call' 2014-10-18T18:09:33.971694+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/faraday-0.9.0/lib/faraday/rack_builder.rb:139:in `build_response' 2014-10-18T18:09:33.971695+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/faraday-0.9.0/lib/faraday/connection.rb:377:in `run_request' 2014-10-18T18:09:33.971696+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/oauth2-0.8.1/lib/oauth2/cli ent.rb:88:in `request' 2014-10-18T18:09:33.971698+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/oauth2-0.8.1/lib/oauth2/access_token.rb:99:in `request' 2014-10-18T18:09:33.971699+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/oauth2-0.8.1/lib/oauth2/access_token.rb:106:in `get' 2014-10-18T18:09:33.971700+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/omniauth-facebook-access-token-0.1.3/lib/omniauth/strategies/facebook-access-token.rb: 90:in `callback_phase' 2014-10-18T18:09:33.971702+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/omniauth-1.2.1/lib/omniauth/strategy.rb:227:in `callback_call' 2014-10-18T18:09:33.971703+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/omniauth-1.2.1/lib/omniauth/strategy.rb:184:in `call!' 2014-10-18T18:09:33.971704+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/omniauth-1.2.1/lib/omniauth/strategy.rb:164:in `call' 2014-10-18T18:09:33.971706+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/omniauth-1.2.1/lib/omniauth/strategy.rb:186:in `call!' 2014-10-18T18:09:33.971707+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/omniauth-1.2.1/lib/omniauth/strategy.rb:164:in `call' 2014-10-18T18:09:33.971708+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/omniauth-1.2.1/lib/omniauth/builder.rb:59:in `call' 2014-10-18T18:09:33.971709+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/newrelic_rpm-3.8.1.221/lib/new_relic/rack/error_collector.rb:55:in `call' 2014-10-18T18:09:33.971711+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/newrelic_rpm-3.8.1.221/lib/new_relic/rack/agent_hooks.rb:32:in `call' 2014-10-18T18:09:33.971712+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/newrelic_rpm-3.8.1.221/lib/new_relic/rack/browser_monitoring.rb:27:in `call' 2014-10-18T18:09:33.971713+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/rack-ssl-1.4.1/lib/rack/ssl.rb:27:in `call' 2014-10-18T18:09:33.971714+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/warden-1.2.3/lib/warden/manager.rb:35:in `block in call' 2014-10-18T18:09:33.880979+00:00 app[web.1]: I, [2014-10-18T18:09:33.880840 #15] INFO -- omniauth: (facebook_access_token) Callback phase initiated. 2014-10-18T18:09:33.971716+00:00 app[web.1]: vendor/bundle/ruby/2.0.0/gems/warden-1.2.3/lib/warden/manager.rb:34:in `catch'

I accidentally stumbled upon a tweet that mentioned facebook quietly dealt with the poodle vulnerability in some manner, and i have a feeling it has to do with what im experiencing. im not sure how to solve it


回答1:


Well basically, in case this happened to anyone -- I was using the omniauth-facebook gem, and something within that gem ( not sure where ) kept using sslv3 (even though facebook dropped it due to the POODLE vulnerability ). I simply switched to the koala gem instead and I was good to go!




回答2:


Check out this question, it probably has the solution you are looking for. Also you can turn off SSL verification, obviously not a good permanent solution but it will allow you to run your app temporarily

How to get rid of OpenSSL::SSL::SSLError



来源:https://stackoverflow.com/questions/26443007/rails-omniauth-facebook-ssl-handshake-failure

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!