lundi 19 octobre 2015

SocketError (getaddrinfo: Temporary failure in name resolution) on production, not local

First of all I read both Rails POST: "SocketError: getaddrinfo: Temporary failure in name resolution" on heroku but not locally and "getaddrinfo: Temporary failure in name resolution" in RoR application.

Production login page crushes after submitting attempt (both wrong and correct inputs)

I use rails 3.2.12, ruby ruby 1.9.3p547 (2014-05-14 revision 45962) [x86_64-linux]

linux version: Linux 2.6.32-504.23.4.el6.x86_64 x86_64

CentOS version: CentOS release 6.6 (Final)

ngix version: nginx version: nginx/1.8.0

On phusion_passenger

Site is partially working. Most pages work.

At login page, after submitting, site crushes.

Notes: It works on my local machine, It worked in production a few days ago. and the email server works.

Franky I'm quite lost, If someone could just direct me to the right direction that would be great- Thank you.

Here are the production logs: (I inserted wrong email and password)

Started GET "/login" for 213.57.55.171 at 2015-10-19 12:53:18 +0300
Processing by SessionsController#new as HTML
  Rendered sessions/new.html.erb within layouts/account (1.6ms)
Completed 200 OK in 8ms (Views: 7.4ms | ActiveRecord: 0.0ms)
Started GET "/assets/plugin/jquery-validate/jquery.validate.min.js" for 213.57.55.171 at 2015-10-19 12:53:19 +0300
Served asset /plugin/jquery-validate/jquery.validate.min.js - 304 Not Modified (0ms)
Connecting to database specified by database.yml
Started POST "/sessions" for 213.57.55.171 at 2015-10-19 12:53:32 +0300
Processing by SessionsController#create as HTML
  Parameters: {"utf8"=>"???", "authenticity_token"=>"fFv7iG+QaXiyQ4HnDLBFYq0pW6wn+SA75/dvHrMClFw=", "email"=>"123456", "password"=>"[FILTERED]", "commit"=>"Login"}

Sent mail to email1@gmail.com (20029ms)
Completed 500 Internal Server Error in 123378ms
  Rendered /home/mydomain/domains/http://ift.tt/1W1UwEh (0.7ms)
  Rendered /home/mydomain/domains/http://ift.tt/1hN1DO2 (0.1ms)
  Rendered /home/mydomain/domains/http://ift.tt/1W1UwEj (0.3ms)
  Rendered /home/mydomain/domains/http://ift.tt/1hN1DO2 (0.1ms)
  Rendered /home/mydomain/domains/http://ift.tt/1hN1Fpp (53.9ms)
  Rendered /home/mydomain/domains/http://ift.tt/1hN1DO2 (0.4ms)
  Rendered /home/mydomain/domains/http://ift.tt/1W1UxrS (0.3ms)
  Rendered /home/mydomain/domains/http://ift.tt/1hN1DO2 (0.1ms)
  Rendered /home/mydomain/domains/http://ift.tt/1hN1DO4 (65.8ms)

Sent mail to email1@gmail.com, email2@gmail.com (20040ms)

SocketError (getaddrinfo: Temporary failure in name resolution):
  /home/mydomain/.rvm/rubies/ruby-1.9.3-p547/lib/ruby/1.9.1/net/smtp.rb:541:in `initialize'
  /home/mydomain/.rvm/rubies/ruby-1.9.3-p547/lib/ruby/1.9.1/net/smtp.rb:541:in `open'
  /home/mydomain/.rvm/rubies/ruby-1.9.3-p547/lib/ruby/1.9.1/net/smtp.rb:541:in `tcp_socket'
  /home/mydomain/.rvm/rubies/ruby-1.9.3-p547/lib/ruby/1.9.1/net/smtp.rb:550:in `block in do_start'
  /home/mydomain/.rvm/rubies/ruby-1.9.3-p547/lib/ruby/1.9.1/timeout.rb:69:in `timeout'
  /home/mydomain/.rvm/rubies/ruby-1.9.3-p547/lib/ruby/1.9.1/timeout.rb:100:in `timeout'
  /home/mydomain/.rvm/rubies/ruby-1.9.3-p547/lib/ruby/1.9.1/net/smtp.rb:550:in `do_start'
  /home/mydomain/.rvm/rubies/ruby-1.9.3-p547/lib/ruby/1.9.1/net/smtp.rb:520:in `start'
  mail (2.4.4) lib/mail/network/delivery_methods/smtp.rb:144:in `deliver!'
  mail (2.4.4) lib/mail/message.rb:2034:in `do_delivery'
  mail (2.4.4) lib/mail/message.rb:229:in `block in deliver'
  actionmailer (3.2.12) lib/action_mailer/base.rb:415:in `block in deliver_mail'
  activesupport (3.2.12) lib/active_support/notifications.rb:123:in `block in instrument'
  activesupport (3.2.12) lib/active_support/notifications/instrumenter.rb:20:in `instrument'
  activesupport (3.2.12) lib/active_support/notifications.rb:123:in `instrument'
  actionmailer (3.2.12) lib/action_mailer/base.rb:413:in `deliver_mail'
  mail (2.4.4) lib/mail/message.rb:229:in `deliver'
  /home/mydomain/domains/http://ift.tt/1W1UwEl `rescue in call'
  /home/mydomain/domains/http://ift.tt/1hN1DO6 `call'
  actionpack (3.2.12) lib/action_dispatch/middleware/best_standards_support.rb:17:in `call'
  rack (1.4.7) lib/rack/etag.rb:23:in `call'
  rack (1.4.7) lib/rack/conditionalget.rb:35:in `call'
  actionpack (3.2.12) lib/action_dispatch/middleware/head.rb:14:in `call'
  remotipart (1.2.1) lib/remotipart/middleware.rb:27:in `call'
  actionpack (3.2.12) lib/action_dispatch/middleware/params_parser.rb:21:in `call'
  actionpack (3.2.12) lib/action_dispatch/middleware/flash.rb:242:in `call'
  rack (1.4.7) lib/rack/session/abstract/id.rb:210:in `context'
  rack (1.4.7) lib/rack/session/abstract/id.rb:205:in `call'
  actionpack (3.2.12) lib/action_dispatch/middleware/cookies.rb:341:in `call'
  activerecord (3.2.12) lib/active_record/query_cache.rb:64:in `call'
  activerecord (3.2.12) lib/active_record/connection_adapters/abstract/connection_pool.rb:479:in `call'
  actionpack (3.2.12) lib/action_dispatch/middleware/callbacks.rb:28:in `block in call'
  activesupport (3.2.12) lib/active_support/callbacks.rb:405:in `_run__3952234548336412195__call__3124490084799062115__callbacks'
  activesupport (3.2.12) lib/active_support/callbacks.rb:405:in `__run_callback'
  activesupport (3.2.12) lib/active_support/callbacks.rb:385:in `_run_call_callbacks'
  activesupport (3.2.12) lib/active_support/callbacks.rb:81:in `run_callbacks'
  actionpack (3.2.12) lib/action_dispatch/middleware/callbacks.rb:27:in `call'
  actionpack (3.2.12) lib/action_dispatch/middleware/remote_ip.rb:31:in `call'
  actionpack (3.2.12) lib/action_dispatch/middleware/debug_exceptions.rb:16:in `call'
  actionpack (3.2.12) lib/action_dispatch/middleware/show_exceptions.rb:56:in `call'
  railties (3.2.12) lib/rails/rack/logger.rb:32:in `call_app'
  railties (3.2.12) lib/rails/rack/logger.rb:16:in `block in call'
  activesupport (3.2.12) lib/active_support/tagged_logging.rb:22:in `tagged'
  railties (3.2.12) lib/rails/rack/logger.rb:16:in `call'
  request_store (1.2.0) lib/request_store/middleware.rb:8:in `call'
  actionpack (3.2.12) lib/action_dispatch/middleware/request_id.rb:22:in `call'
  rack (1.4.7) lib/rack/methodoverride.rb:21:in `call'
  rack (1.4.7) lib/rack/runtime.rb:17:in `call'
  activesupport (3.2.12) lib/active_support/cache/strategy/local_cache.rb:72:in `call'
  rack (1.4.7) lib/rack/lock.rb:15:in `call'
  rack-ssl (1.3.4) lib/rack/ssl.rb:27:in `call'
  rack-cache (1.2) lib/rack/cache/context.rb:136:in `forward'
  rack-cache (1.2) lib/rack/cache/context.rb:143:in `pass'
  rack-cache (1.2) lib/rack/cache/context.rb:155:in `invalidate'
  rack-cache (1.2) lib/rack/cache/context.rb:71:in `call!'
  rack-cache (1.2) lib/rack/cache/context.rb:51:in `call'
  railties (3.2.12) lib/rails/engine.rb:479:in `call'
  railties (3.2.12) lib/rails/application.rb:223:in `call'
  railties (3.2.12) lib/rails/railtie/configurable.rb:30:in `method_missing'
  rack (1.4.7) lib/rack/deflater.rb:13:in `call'
  /opt/passenger/passenger-4.0.58/lib/phusion_passenger/rack/thread_handler_extension.rb:74:in `process_request'
  /opt/passenger/passenger-4.0.58/lib/phusion_passenger/request_handler/thread_handler.rb:141:in `accept_and_process_next_request'
  /opt/passenger/passenger-4.0.58/lib/phusion_passenger/request_handler/thread_handler.rb:109:in `main_loop'
  /opt/passenger/passenger-4.0.58/lib/phusion_passenger/request_handler.rb:455:in `block (3 levels) in start_threads'

Aucun commentaire:

Enregistrer un commentaire