Skip to content

Instantly share code, notes, and snippets.

@clemensp
Created February 1, 2012 22:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save clemensp/1719981 to your computer and use it in GitHub Desktop.
Save clemensp/1719981 to your computer and use it in GitHub Desktop.
Completed 500 Internal Server Error in 45ms
** [Airbrake] [Airbrake::Sender#send_to_airbrake] Cannot send notification. Error: OpenSSL::SSL::SSLError - SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed
Backtrace:
/usr/lib64/rubyee/1.8/net/http.rb:586:in `connect'
/usr/lib64/rubyee/1.8/net/http.rb:586:in `connect'
/usr/lib64/rubyee/1.8/net/http.rb:553:in `do_start'
/usr/lib64/rubyee/1.8/net/http.rb:542:in `start'
/usr/lib64/rubyee/1.8/net/http.rb:1035:in `request_without_newrelic_trace'
/data/nulogy/shared/bundled_gems/ruby/1.8/gems/newrelic_rpm-3.2.0.1/lib/new_relic/agent/instrumentation/net.rb:22:in `request'
/data/nulogy/shared/bundled_gems/ruby/1.8/gems/newrelic_rpm-3.2.0.1/lib/new_relic/agent/method_tracer.rb:242:in `trace_execution_scoped'
/data/nulogy/shared/bundled_gems/ruby/1.8/gems/newrelic_rpm-3.2.0.1/lib/new_relic/agent/instrumentation/net.rb:21:in `request'
/usr/lib64/rubyee/1.8/net/http.rb:845:in `post'
/data/nulogy/shared/bundled_gems/ruby/1.8/gems/airbrake-3.0.9/lib/airbrake/sender.rb:39:in `send_to_airbrake'
/data/nulogy/shared/bundled_gems/ruby/1.8/gems/airbrake-3.0.9/lib/airbrake.rb:135:in `send_notice'
/data/nulogy/shared/bundled_gems/ruby/1.8/gems/airbrake-3.0.9/lib/airbrake.rb:111:in `notify_or_ignore'
/data/nulogy/shared/bundled_gems/ruby/1.8/gems/airbrake-3.0.9/lib/airbrake/rack.rb:29:in `call'
/data/nulogy/shared/bundled_gems/ruby/1.8/gems/actionpack-3.1.1/lib/action_dispatch/middleware/best_standards_support.rb:17:in `call'
/data/nulogy/shared/bundled_gems/ruby/1.8/gems/rack-1.3.5/lib/rack/etag.rb:23:in `call'
/data/nulogy/shared/bundled_gems/ruby/1.8/gems/rack-1.3.5/lib/rack/conditionalget.rb:25:in `call'
/data/nulogy/shared/bundled_gems/ruby/1.8/gems/actionpack-3.1.1/lib/action_dispatch/middleware/head.rb:14:in `call'
/data/nulogy/shared/bundled_gems/ruby/1.8/gems/remotipart-1.0.1/lib/remotipart/middleware.rb:30:in `call'
/data/nulogy/shared/bundled_gems/ruby/1.8/gems/actionpack-3.1.1/lib/action_dispatch/middleware/params_parser.rb:21:in `call'
/data/nulogy/shared/bundled_gems/ruby/1.8/gems/actionpack-3.1.1/lib/action_dispatch/middleware/flash.rb:243:in `call'
/data/nulogy/shared/bundled_gems/ruby/1.8/gems/rack-1.3.5/lib/rack/session/abstract/id.rb:195:in `context'
/data/nulogy/shared/bundled_gems/ruby/1.8/gems/rack-1.3.5/lib/rack/session/abstract/id.rb:190:in `call'
/data/nulogy/shared/bundled_gems/ruby/1.8/gems/actionpack-3.1.1/lib/action_dispatch/middleware/cookies.rb:331:in `call'
/data/nulogy/shared/bundled_gems/ruby/1.8/gems/activerecord-3.1.1/lib/active_record/query_cache.rb:62:in `call'
/data/nulogy/shared/bundled_gems/ruby/1.8/gems/activerecord-3.1.1/lib/active_record/connection_adapters/abstract/connection_pool.rb:477:in `call'
/data/nulogy/shared/bundled_gems/ruby/1.8/gems/actionpack-3.1.1/lib/action_dispatch/middleware/callbacks.rb:29:in `call'
/data/nulogy/shared/bundled_gems/ruby/1.8/gems/activesupport-3.1.1/lib/active_support/callbacks.rb:392:in `_run_call_callbacks'
/data/nulogy/shared/bundled_gems/ruby/1.8/gems/activesupport-3.1.1/lib/active_support/callbacks.rb:81:in `send'
/data/nulogy/shared/bundled_gems/ruby/1.8/gems/activesupport-3.1.1/lib/active_support/callbacks.rb:81:in `run_callbacks'
/data/nulogy/shared/bundled_gems/ruby/1.8/gems/actionpack-3.1.1/lib/action_dispatch/middleware/callbacks.rb:28:in `call'
/data/nulogy/shared/bundled_gems/ruby/1.8/gems/rack-1.3.5/lib/rack/sendfile.rb:101:in `call'
/data/nulogy/shared/bundled_gems/ruby/1.8/gems/actionpack-3.1.1/lib/action_dispatch/middleware/remote_ip.rb:48:in `call'
/data/nulogy/shared/bundled_gems/ruby/1.8/gems/actionpack-3.1.1/lib/action_dispatch/middleware/show_exceptions.rb:47:in `call'
/data/nulogy/shared/bundled_gems/ruby/1.8/gems/railties-3.1.1/li
72.46.232.13:7002 -> b/rails/rack/logger.rb:13:in `call'
/data/nulogy/shared/bundled_gems/ruby/1.8/gems/rack-1.3.5/lib/rack/methodoverride.rb:24:in `call'
/data/nulogy/shared/bundled_gems/ruby/1.8/gems/rack-1.3.5/lib/rack/runtime.rb:17:in `call'
/data/nulogy/shared/bundled_gems/ruby/1.8/gems/activesupport-3.1.1/lib/active_support/cache/strategy/local_cache.rb:72:in `call'
/data/nulogy/shared/bundled_gems/ruby/1.8/gems/rack-1.3.5/lib/rack/lock.rb:15:in `call'
/data/nulogy/shared/bundled_gems/ruby/1.8/gems/rack-cache-1.1/lib/rack/cache/context.rb:132:in `forward'
/data/nulogy/shared/bundled_gems/ruby/1.8/gems/rack-cache-1.1/lib/rack/cache/context.rb:241:in `fetch'
/data/nulogy/shared/bundled_gems/ruby/1.8/gems/rack-cache-1.1/lib/rack/cache/context.rb:181:in `lookup'
/data/nulogy/shared/bundled_gems/ruby/1.8/gems/rack-cache-1.1/lib/rack/cache/context.rb:65:in `call!'
/data/nulogy/shared/bundled_gems/ruby/1.8/gems/rack-cache-1.1/lib/rack/cache/context.rb:50:in `call'
/data/nulogy/shared/bundled_gems/ruby/1.8/gems/airbrake-3.0.9/lib/airbrake/user_informer.rb:12:in `call'
/data/nulogy/shared/bundled_gems/ruby/1.8/gems/railties-3.1.1/lib/rails/engine.rb:456:in `call'
/data/nulogy/shared/bundled_gems/ruby/1.8/gems/railties-3.1.1/lib/rails/railtie/configurable.rb:30:in `send'
/data/nulogy/shared/bundled_gems/ruby/1.8/gems/railties-3.1.1/lib/rails/railtie/configurable.rb:30:in `method_missing'
/usr/libexec/passenger/lib/phusion_passenger/rack/request_handler.rb:96:in `process_request'
/usr/libexec/passenger/lib/phusion_passenger/abstract_request_handler.rb:513:in `accept_and_process_next_request'
/usr/libexec/passenger/lib/phusion_passenger/abstract_request_handler.rb:274:in `main_loop'
/usr/libexec/passenger/lib/phusion_passenger/rack/application_spawner.rb:205:in `start_request_handler'
/usr/libexec/passenger/lib/phusion_passenger/rack/application_spawner.rb:170:in `send'
/usr/libexec/passenger/lib/phusion_passenger/rack/application_spawner.rb:170:in `handle_spawn_application'
/usr/libexec/passenger/lib/phusion_passenger/utils.rb:479:in `safe_fork'
/usr/libexec/passenger/lib/phusion_passenger/rack/application_spawner.rb:165:in `handle_spawn_application'
/usr/libexec/passenger/lib/phusion_passenger/abstract_server.rb:357:in `__send__'
/usr/libexec/passenger/lib/phusion_passenger/abstract_server.rb:357:in `server_main_loop'
/usr/libexec/passenger/lib/phusion_passenger/abstract_server.rb:206:in `start_synchronously'
/usr/libexec/passenger/lib/phusion_passenger/abstract_server.rb:180:in `start'
/usr/libexec/passenger/lib/phusion_passenger/rack/application_spawner.rb:128:in `start'
/usr/libexec/passenger/lib/phusion_passenger/spawn_manager.rb:253:in `spawn_rack_application'
/usr/libexec/passenger/lib/phusion_passenger/abstract_server_collection.rb:132:in `lookup_or_add'
/usr/libexec/passenger/lib/phusion_passenger/spawn_manager.rb:246:in `spawn_rack_application'
/usr/libexec/passenger/lib/phusion_passenger/abstract_server_collection.rb:82:in `synchronize'
/usr/libexec/passenger/lib/phusion_passenger/abstract_server_collection.rb:79:in `synchronize'
/usr/libexec/passenger/lib/phusion_passenger/spawn_manager.rb:244:in `spawn_rack_application'
/usr/libexec/passenger/lib/phusion_passenger/spawn_manager.rb:137:in `spawn_application'
/usr/libexec/passenger/lib/phusion_passenger/spawn_manager.rb:275:in `handle_spawn_application'
/usr/libexec/passenger/lib/phusion_passenger/abstract_server.rb:357:in `__send__'
/usr/libexec/passenger/lib/phusion_passenger/abstract_server.rb:357:in `server_main_loop'
/usr/libexec/passenger/lib/phusion_passenger/abstract_server.rb:206:in `start_synchronously'
/usr/libexec/passenger/bin/passenger-spawn-server:101
** [Airbrake] Environment Info: [Ruby: 1.8.7] [Rails: 3.1.1] [Env: production]
RuntimeError (Testing):
app/controllers/test_controller.rb:7:in `exception'
@agibralter
Copy link

Were you ever able to figure out what was going on?

@benarent
Copy link

@clemensp
Copy link
Author

It was a weird situation, since the issue was supposed to be fixed in 3.0.8+. ( the issue posted by @benarent )

In my case, the fix worked on all the qa, staging, sandbox slices, but it did not work on the production slices.
The codepath was for using Airbrake's custom CA bundle was not being hit on the production slices.

An alternative fix would've been to create my own custom CA bundle, and set use_system_ssl_cert_chain to true, but didn't deem it worth the effort (to set it up and maintain it).
The last option is to disable SSL. :(

@agibralter
Copy link

Ah... ok, I saw that. Hmmm... I guess I'll either have to turn off ssl or use a different service for now....

@benarent
Copy link

@clemensp and @agiralter I'm going to raise this issue with our team again, to see if we can come up with a better solution.

@agibralter
Copy link

agibralter commented Mar 14, 2012 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment