Question

I have a function which is suddenly not working anymore. It says :

"A SocketError occurred in projects#update: 

getaddrinfo: Name or service not known 
/usr/local/rvm/rubies/ruby-1.9.3-p448/lib/ruby/1.9.1/net/http.rb:763:in `initialize' "

Basically when I click on the "Next" button from that, it is triggering the error message above and the function is indeed bugging (white screen).

Note that I am also using Nginx and NewRelic to monitor the main URL availability

Below is the backtrace

------------------------------- 
Backtrace: 
------------------------------- 

/usr/local/rvm/rubies/ruby-1.9.3-p448/lib/ruby/1.9.1/net/http.rb:763:in `initialize' 
/usr/local/rvm/rubies/ruby-1.9.3-p448/lib/ruby/1.9.1/net/http.rb:763:in `open' 
/usr/local/rvm/rubies/ruby-1.9.3-p448/lib/ruby/1.9.1/net/http.rb:763:in `block in connect' 
/usr/local/rvm/rubies/ruby-1.9.3-p448/lib/ruby/1.9.1/timeout.rb:55:in `timeout' 
/usr/local/rvm/rubies/ruby-1.9.3-p448/lib/ruby/1.9.1/timeout.rb:100:in `timeout' 
/usr/local/rvm/rubies/ruby-1.9.3-p448/lib/ruby/1.9.1/net/http.rb:763:in `connect' 
/usr/local/rvm/rubies/ruby-1.9.3-p448/lib/ruby/1.9.1/net/http.rb:756:in `do_start' 
/usr/local/rvm/rubies/ruby-1.9.3-p448/lib/ruby/1.9.1/net/http.rb:745:in `start' 
/usr/local/rvm/rubies/ruby-1.9.3-p448/lib/ruby/1.9.1/net/http.rb:1285:in `request' 
vendor/bundle/ruby/1.9.1/gems/newrelic_rpm-3.7.1.188/lib/new_relic/agent/instrumentation/net.rb:27:in `block (2 levels) in request_with_newrelic_trace' 
vendor/bundle/ruby/1.9.1/gems/newrelic_rpm-3.7.1.188/lib/new_relic/agent.rb:400:in `disable_all_tracing' 
vendor/bundle/ruby/1.9.1/gems/newrelic_rpm-3.7.1.188/lib/new_relic/agent/instrumentation/net.rb:26:in `block in request_with_newrelic_trace' 
vendor/bundle/ruby/1.9.1/gems/newrelic_rpm-3.7.1.188/lib/new_relic/agent/cross_app_tracing.rb:41:in `trace_http_request' 
vendor/bundle/ruby/1.9.1/gems/newrelic_rpm-3.7.1.188/lib/new_relic/agent/instrumentation/net.rb:23:in `request_with_newrelic_trace' 
/usr/local/rvm/rubies/ruby-1.9.3-p448/lib/ruby/1.9.1/net/http.rb:1308:in `send_entity' 
/usr/local/rvm/rubies/ruby-1.9.3-p448/lib/ruby/1.9.1/net/http.rb:1097:in `post' 
vendor/bundle/ruby/1.9.1/gems/ruby-akismet-1.0.0/lib/akismet.rb:166:in `call' 
vendor/bundle/ruby/1.9.1/gems/ruby-akismet-1.0.0/lib/akismet.rb:141:in `call' 
vendor/bundle/ruby/1.9.1/gems/ruby-akismet-1.0.0/lib/akismet.rb:119:in `spam?' 
app/controllers/projects_controller.rb:336:in `block in update' 
vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.3/lib/action_controller/metal/mime_responds.rb:270:in `call' 
vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.3/lib/action_controller/metal/mime_responds.rb:270:in `retrieve_collector_from_mimes' 
vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.3/lib/action_controller/metal/mime_responds.rb:194:in `respond_to' 
app/controllers/projects_controller.rb:122:in `update' 
vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.3/lib/action_controller/metal/implicit_render.rb:4:in `send_action' 
vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.3/lib/abstract_controller/base.rb:167:in `process_action' 
vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.3/lib/action_controller/metal/rendering.rb:10:in `process_action' 
vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.3/lib/abstract_controller/callbacks.rb:18:in `block in process_action' 
vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.3/lib/active_support/callbacks.rb:458:in `_run__130999502__process_action__975154384__callbacks' 
vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.3/lib/active_support/callbacks.rb:405:in `__run_callback' 
vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.3/lib/active_support/callbacks.rb:385:in `_run_process_action_callbacks' 
vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.3/lib/active_support/callbacks.rb:81:in `run_callbacks' 
vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.3/lib/abstract_controller/callbacks.rb:17:in `process_action' 
vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.3/lib/action_controller/metal/rescue.rb:29:in `process_action' 
vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.3/lib/action_controller/metal/instrumentation.rb:30:in `block in process_action' 
vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.3/lib/active_support/notifications.rb:123:in `block in instrument' 
vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.3/lib/active_support/notifications/instrumenter.rb:20:in `instrument' 
vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.3/lib/active_support/notifications.rb:123:in `instrument' 
vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.3/lib/action_controller/metal/instrumentation.rb:29:in `process_action' 
vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.3/lib/action_controller/metal/params_wrapper.rb:205:in `process_action' 
vendor/bundle/ruby/1.9.1/gems/activerecord-3.2.3/lib/active_record/railties/controller_runtime.rb:18:in `process_action' 
vendor/bundle/ruby/1.9.1/gems/newrelic_rpm-3.7.1.188/lib/new_relic/agent/instrumentation/rails3/action_controller.rb:38:in `block in process_action' 
vendor/bundle/ruby/1.9.1/gems/newrelic_rpm-3.7.1.188/lib/new_relic/agent/instrumentation/controller_instrumentation.rb:339:in `perform_action_with_newrelic_trace' 
vendor/bundle/ruby/1.9.1/gems/newrelic_rpm-3.7.1.188/lib/new_relic/agent/instrumentation/rails3/action_controller.rb:37:in `process_action' 
vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.3/lib/abstract_controller/base.rb:121:in `process' 
vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.3/lib/abstract_controller/rendering.rb:45:in `process' 
vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.3/lib/action_controller/metal.rb:203:in `dispatch' 
vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.3/lib/action_controller/metal/rack_delegation.rb:14:in `dispatch' 
vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.3/lib/action_controller/metal.rb:246:in `block in action' 
vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.3/lib/action_dispatch/routing/route_set.rb:73:in `call' 
vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.3/lib/action_dispatch/routing/route_set.rb:73:in `dispatch' 
vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.3/lib/action_dispatch/routing/route_set.rb:36:in `call' 
vendor/bundle/ruby/1.9.1/gems/journey-1.0.4/lib/journey/router.rb:68:in `block in call' 
vendor/bundle/ruby/1.9.1/gems/journey-1.0.4/lib/journey/router.rb:56:in `each' 
vendor/bundle/ruby/1.9.1/gems/journey-1.0.4/lib/journey/router.rb:56:in `call' 
vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.3/lib/action_dispatch/routing/route_set.rb:600:in `call' 
vendor/bundle/ruby/1.9.1/gems/newrelic_rpm-3.7.1.188/lib/new_relic/rack/error_collector.rb:50:in `call' 
vendor/bundle/ruby/1.9.1/gems/newrelic_rpm-3.7.1.188/lib/new_relic/rack/agent_hooks.rb:28:in `call' 
vendor/bundle/ruby/1.9.1/gems/newrelic_rpm-3.7.1.188/lib/new_relic/rack/browser_monitoring.rb:23:in `call' 
vendor/bundle/ruby/1.9.1/gems/exception_notification-3.0.0/lib/exception_notifier.rb:40:in `call' 
vendor/bundle/ruby/1.9.1/gems/galetahub-simple_captcha-0.1.3/lib/simple_captcha/middleware.rb:20:in `call' 
vendor/bundle/ruby/1.9.1/gems/warden-1.2.1/lib/warden/manager.rb:35:in `block in call' 
vendor/bundle/ruby/1.9.1/gems/warden-1.2.1/lib/warden/manager.rb:34:in `catch' 
vendor/bundle/ruby/1.9.1/gems/warden-1.2.1/lib/warden/manager.rb:34:in `call' 
vendor/bundle/ruby/1.9.1/gems/client_side_validations-3.1.4/lib/client_side_validations/middleware.rb:18:in `call' 
vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.3/lib/action_dispatch/middleware/best_standards_support.rb:17:in `call' 
vendor/bundle/ruby/1.9.1/gems/rack-1.4.1/lib/rack/etag.rb:23:in `call' 
vendor/bundle/ruby/1.9.1/gems/rack-1.4.1/lib/rack/conditionalget.rb:35:in `call' 
vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.3/lib/action_dispatch/middleware/head.rb:14:in `call' 
vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.3/lib/action_dispatch/middleware/params_parser.rb:21:in `call' 
vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.3/lib/action_dispatch/middleware/flash.rb:242:in `call' 
vendor/bundle/ruby/1.9.1/gems/rack-1.4.1/lib/rack/session/abstract/id.rb:205:in `context' 
vendor/bundle/ruby/1.9.1/gems/rack-1.4.1/lib/rack/session/abstract/id.rb:200:in `call' 
vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.3/lib/action_dispatch/middleware/cookies.rb:338:in `call' 
vendor/bundle/ruby/1.9.1/gems/activerecord-3.2.3/lib/active_record/query_cache.rb:64:in `call' 
vendor/bundle/ruby/1.9.1/gems/activerecord-3.2.3/lib/active_record/connection_adapters/abstract/connection_pool.rb:467:in `call' 
vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.3/lib/action_dispatch/middleware/callbacks.rb:28:in `block in call' 
vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.3/lib/active_support/callbacks.rb:405:in `_run__791873830__call__941687645__callbacks' 
vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.3/lib/active_support/callbacks.rb:405:in `__run_callback' 
vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.3/lib/active_support/callbacks.rb:385:in `_run_call_callbacks' 
vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.3/lib/active_support/callbacks.rb:81:in `run_callbacks' 
vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.3/lib/action_dispatch/middleware/callbacks.rb:27:in `call' 
vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.3/lib/action_dispatch/middleware/remote_ip.rb:31:in `call' 
vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.3/lib/action_dispatch/middleware/debug_exceptions.rb:16:in `call' 
vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.3/lib/action_dispatch/middleware/show_exceptions.rb:56:in `call' 
vendor/bundle/ruby/1.9.1/gems/railties-3.2.3/lib/rails/rack/logger.rb:26:in `call_app' 
vendor/bundle/ruby/1.9.1/gems/railties-3.2.3/lib/rails/rack/logger.rb:16:in `call' 
vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.3/lib/action_dispatch/middleware/request_id.rb:22:in `call' 
vendor/bundle/ruby/1.9.1/gems/rack-1.4.1/lib/rack/methodoverride.rb:21:in `call' 
vendor/bundle/ruby/1.9.1/gems/rack-1.4.1/lib/rack/runtime.rb:17:in `call' 
vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.3/lib/active_support/cache/strategy/local_cache.rb:72:in `call' 
vendor/bundle/ruby/1.9.1/gems/rack-1.4.1/lib/rack/lock.rb:15:in `call' 
vendor/bundle/ruby/1.9.1/gems/rack-cache-1.2/lib/rack/cache/context.rb:136:in `forward' 
vendor/bundle/ruby/1.9.1/gems/rack-cache-1.2/lib/rack/cache/context.rb:143:in `pass' 
vendor/bundle/ruby/1.9.1/gems/rack-cache-1.2/lib/rack/cache/context.rb:155:in `invalidate' 
vendor/bundle/ruby/1.9.1/gems/rack-cache-1.2/lib/rack/cache/context.rb:71:in `call!' 
vendor/bundle/ruby/1.9.1/gems/rack-cache-1.2/lib/rack/cache/context.rb:51:in `call' 
vendor/bundle/ruby/1.9.1/gems/railties-3.2.3/lib/rails/engine.rb:479:in `call' 
vendor/bundle/ruby/1.9.1/gems/railties-3.2.3/lib/rails/application.rb:220:in `call' 
vendor/bundle/ruby/1.9.1/gems/railties-3.2.3/lib/rails/railtie/configurable.rb:30:in `method_missing' 
/usr/local/rvm/gems/ruby-1.9.3-p448/gems/passenger-4.0.10/lib/phusion_passenger/rack/thread_handler_extension.rb:77:in `process_request' 
/usr/local/rvm/gems/ruby-1.9.3-p448/gems/passenger-4.0.10/lib/phusion_passenger/request_handler/thread_handler.rb:140:in `accept_and_process_next_request' 
/usr/local/rvm/gems/ruby-1.9.3-p448/gems/passenger-4.0.10/lib/phusion_passenger/request_handler/thread_handler.rb:108:in `main_loop' 
/usr/local/rvm/gems/ruby-1.9.3-p448/gems/passenger-4.0.10/lib/phusion_passenger/request_handler.rb:441:in `block (3 levels) in start_threads' 

Any idea what is happening? Thanks! Roman

Was it helpful?

Solution

Your application is trying to call out to Akismet for spam detection but failing. You’re using ruby-akismet, did you configure it as called for in the documentation?

In config/initializers/akismet.rb:

Akismet.key    = '123456789'
Akismet.blog   = 'http://example.com'
Akismet.logger = Rails.logger
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top