method-inc / bamboozled

Bamboozled wraps the BambooHR API without the use of Rails dependencies.
MIT License
44 stars 50 forks source link

Intermittent OpenSSL::SSL::SSLError: SSL_connect returned=1 errno=0 state=error: certificate verify failed #33

Closed artfuldodger closed 7 years ago

artfuldodger commented 7 years ago

My application's import of users from BambooHR has been working for months, but today I started seeing intermittent OpenSSL exceptions. Not sure if this is an issue with my setup, the gem, or if it's on Bamboo's side, but I thought I'd check here to see if anyone has any ideas.

irb(main):017:0> employee.class
=> Bamboozled::API::Employee
# Works fine sometimes
irb(main):015:0> employee.find('37', :all); nil        
=> nil
# But.. sometimes it doesn't
irb(main):016:0> 20.times { employee.find('37', :all) }; nil
OpenSSL::SSL::SSLError: SSL_connect returned=1 errno=0 state=error: certificate verify failed
    from /Users/bonusly/.rbenv/versions/2.4.1/lib/ruby/2.4.0/net/protocol.rb:44:in `connect_nonblock'
    from /Users/bonusly/.rbenv/versions/2.4.1/lib/ruby/2.4.0/net/protocol.rb:44:in `ssl_socket_connect'
    from /Users/bonusly/.rbenv/versions/2.4.1/lib/ruby/2.4.0/net/http.rb:948:in `connect'
    from /Users/bonusly/.rbenv/versions/2.4.1/lib/ruby/2.4.0/net/http.rb:887:in `do_start'
    from /Users/bonusly/.rbenv/versions/2.4.1/lib/ruby/2.4.0/net/http.rb:876:in `start'
    from /Users/bonusly/.rbenv/versions/2.4.1/lib/ruby/2.4.0/net/http.rb:1407:in `request'
    from /Users/bonusly/.rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/gems/rack-mini-profiler-0.10.1/lib/patches/net_patches.rb:7:in `block in request_with_mini_profiler'
    from /Users/bonusly/.rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/gems/rack-mini-profiler-0.10.1/lib/mini_profiler/profiling_methods.rb:37:in `step'
    from /Users/bonusly/.rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/gems/rack-mini-profiler-0.10.1/lib/patches/net_patches.rb:6:in `request_with_mini_profiler'
    from /Users/bonusly/.rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/gems/httparty-0.13.7/lib/httparty/request.rb:117:in `perform'
    from /Users/bonusly/.rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/gems/httparty-0.13.7/lib/httparty.rb:545:in `perform_request'
    from /Users/bonusly/.rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/gems/httparty-0.13.7/lib/httparty.rb:476:in `get'
    from /Users/bonusly/.rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/gems/httparty-0.13.7/lib/httparty.rb:583:in `get'
    from /Users/bonusly/.rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/gems/bamboozled-0.1.0/lib/bamboozled/api/base.rb:33:in `request'
    from /Users/bonusly/.rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/gems/bamboozled-0.1.0/lib/bamboozled/api/employee.rb:23:in `find'
    from (irb):16:in `block in irb_binding'
... 3 levels...
    from /Users/bonusly/.rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/gems/railties-4.2.8/lib/rails/commands/console.rb:9:in `start'
    from /Users/bonusly/.rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/gems/railties-4.2.8/lib/rails/commands/commands_tasks.rb:68:in `console'
    from /Users/bonusly/.rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/gems/railties-4.2.8/lib/rails/commands/commands_tasks.rb:39:in `run_command!'
    from /Users/bonusly/.rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/gems/railties-4.2.8/lib/rails/commands.rb:17:in `<top (required)>'
    from /Users/bonusly/.rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/gems/activesupport-4.2.8/lib/active_support/dependencies.rb:274:in `require'
    from /Users/bonusly/.rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/gems/activesupport-4.2.8/lib/active_support/dependencies.rb:274:in `block in require'
    from /Users/bonusly/.rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/gems/activesupport-4.2.8/lib/active_support/dependencies.rb:240:in `load_dependency'
    from /Users/bonusly/.rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/gems/activesupport-4.2.8/lib/active_support/dependencies.rb:274:in `require'
    from /Users/bonusly/bonusly/special_sauce/bin/rails:11:in `<top (required)>'
    from /Users/bonusly/.rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/gems/activesupport-4.2.8/lib/active_support/dependencies.rb:268:in `load'
    from /Users/bonusly/.rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/gems/activesupport-4.2.8/lib/active_support/dependencies.rb:268:in `block in load'
    from /Users/bonusly/.rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/gems/activesupport-4.2.8/lib/active_support/dependencies.rb:240:in `load_dependency'
    from /Users/bonusly/.rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/gems/activesupport-4.2.8/lib/active_support/dependencies.rb:268:in `load'
    from /Users/bonusly/.rbenv/versions/2.4.1/lib/ruby/2.4.0/rubygems/core_ext/kernel_require.rb:55:in `require'
    from /Users/bonusly/.rbenv/versions/2.4.1/lib/ruby/2.4.0/rubygems/core_ext/kernel_require.rb:55:in `require'
    from -e:1:in `<main>'
mookie5dc commented 7 years ago

I am getting the error also. I believe it means their SSL cert has expired.


From: Jon Evans notifications@github.com Sent: Tuesday, April 11, 2017 6:49:44 PM To: Skookum/bamboozled Cc: Subscribed Subject: [Skookum/bamboozled] Intermittent OpenSSL::SSL::SSLError: SSL_connect returned=1 errno=0 state=error: certificate verify failed (#33)

My application's import of users from BambooHR has been working for months, but today I started seeing intermittent OpenSSL exceptions. Not sure if this is an issue with my setup, the gem, or if it's on Bamboo's side, but I thought I'd check here to see if anyone has any ideas.

irb(main):017:0> employee.class => Bamboozled::API::Employee

Works fine sometimes

irb(main):015:0> employee.find('37', :all); nil => nil

But.. sometimes it doesn't

irb(main):016:0> 20.times { employee.find('37', :all) }; nil OpenSSL::SSL::SSLError: SSL_connect returned=1 errno=0 state=error: certificate verify failed from /Users/bonusly/.rbenv/versions/2.4.1/lib/ruby/2.4.0/net/protocol.rb:44:in connect_nonblock' from /Users/bonusly/.rbenv/versions/2.4.1/lib/ruby/2.4.0/net/protocol.rb:44:inssl_socket_connect' from /Users/bonusly/.rbenv/versions/2.4.1/lib/ruby/2.4.0/net/http.rb:948:in connect' from /Users/bonusly/.rbenv/versions/2.4.1/lib/ruby/2.4.0/net/http.rb:887:indo_start' from /Users/bonusly/.rbenv/versions/2.4.1/lib/ruby/2.4.0/net/http.rb:876:in start' from /Users/bonusly/.rbenv/versions/2.4.1/lib/ruby/2.4.0/net/http.rb:1407:inrequest' from /Users/bonusly/.rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/gems/rack-mini-profiler-0.10.1/lib/patches/net_patches.rb:7:in block in request_with_mini_profiler' from /Users/bonusly/.rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/gems/rack-mini-profiler-0.10.1/lib/mini_profiler/profiling_methods.rb:37:instep' from /Users/bonusly/.rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/gems/rack-mini-profiler-0.10.1/lib/patches/net_patches.rb:6:in request_with_mini_profiler' from /Users/bonusly/.rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/gems/httparty-0.13.7/lib/httparty/request.rb:117:inperform' from /Users/bonusly/.rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/gems/httparty-0.13.7/lib/httparty.rb:545:in perform_request' from /Users/bonusly/.rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/gems/httparty-0.13.7/lib/httparty.rb:476:inget' from /Users/bonusly/.rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/gems/httparty-0.13.7/lib/httparty.rb:583:in get' from /Users/bonusly/.rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/gems/bamboozled-0.1.0/lib/bamboozled/api/base.rb:33:inrequest' from /Users/bonusly/.rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/gems/bamboozled-0.1.0/lib/bamboozled/api/employee.rb:23:in find' from (irb):16:inblock in irb_binding' ... 3 levels... from /Users/bonusly/.rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/gems/railties-4.2.8/lib/rails/commands/console.rb:9:in start' from /Users/bonusly/.rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/gems/railties-4.2.8/lib/rails/commands/commands_tasks.rb:68:inconsole' from /Users/bonusly/.rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/gems/railties-4.2.8/lib/rails/commands/commands_tasks.rb:39:in run_command!' from /Users/bonusly/.rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/gems/railties-4.2.8/lib/rails/commands.rb:17:in<top (required)>' from /Users/bonusly/.rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/gems/activesupport-4.2.8/lib/active_support/dependencies.rb:274:in require' from /Users/bonusly/.rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/gems/activesupport-4.2.8/lib/active_support/dependencies.rb:274:inblock in require' from /Users/bonusly/.rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/gems/activesupport-4.2.8/lib/active_support/dependencies.rb:240:in load_dependency' from /Users/bonusly/.rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/gems/activesupport-4.2.8/lib/active_support/dependencies.rb:274:inrequire' from /Users/bonusly/bonusly/special_sauce/bin/rails:11:in <top (required)>' from /Users/bonusly/.rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/gems/activesupport-4.2.8/lib/active_support/dependencies.rb:268:inload' from /Users/bonusly/.rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/gems/activesupport-4.2.8/lib/active_support/dependencies.rb:268:in block in load' from /Users/bonusly/.rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/gems/activesupport-4.2.8/lib/active_support/dependencies.rb:240:inload_dependency' from /Users/bonusly/.rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/gems/activesupport-4.2.8/lib/active_support/dependencies.rb:268:in load' from /Users/bonusly/.rbenv/versions/2.4.1/lib/ruby/2.4.0/rubygems/core_ext/kernel_require.rb:55:inrequire' from /Users/bonusly/.rbenv/versions/2.4.1/lib/ruby/2.4.0/rubygems/core_ext/kernel_require.rb:55:in require' from -e:1:in

'

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHubhttps://github.com/Skookum/bamboozled/issues/33, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AALEE4-FMe7smrVaInwg0nBa4pM8m632ks5rvC24gaJpZM4M62mB.

artfuldodger commented 7 years ago

Looks like the issue has resolved itself this morning.