EOFError in Devise/passwordsController#create
First off, all other mail being sent by the application work. It is only when the reset password within Devise is called. From the stack trace as well as the WEBrick output the email completes being created but then terminates with a EOFError.
Application Stack:
C:/Ruby192/lib/ruby/1.9.1/net/protocol.rb:135:in `read_nonblock'
C:/Ruby192/lib/ruby/1.9.1/net/protocol.rb:135:in `rbuf_fill'
C:/Ruby192/lib/ruby/1.9.1/net/protocol.rb:116:in `readuntil'
C:/Ruby192/lib/ruby/1.9.1/net/protocol.rb:126:in `readline'
C:/Ruby192/lib/ruby/1.9.1/net/smtp.rb:935:in `recv_response'
C:/Ruby192/lib/ruby/1.9.1/net/smtp.rb:921:in `block in getok'
C:/Ruby192/lib/ruby/1.9.1/net/smtp.rb:945:in `critical'
C:/Ruby192/lib/ruby/1.9.1/net/smtp.rb:919:in `getok'
C:/Ruby192/lib/ruby/1.9.1/net/smtp.rb:913:in `quit'
C:/Ruby192/lib/ruby/1.9.1/net/smtp.rb:619:in `do_finish'
C:/Ruby192/lib/ruby/1.9.1/net/smtp.rb:528:in `start'
mail (2.2.14) lib/mail/network/delivery_methods/smtp.rb:127:in `deliver!'
mail (2.2.14) lib/mail/message.rb:1967:in `do_delivery'
mail (2.2.14) lib/mail/message.rb:228:in `block in deliver'
actionmailer (3.0.3) lib/action_mailer/base.rb:401:in `block in deliver_mail'
activesupport (3.0.3) lib/active_support/notifications.rb:52:in `block in instrument'
activesupport (3.0.3) lib/active_support/notifications/instrumenter.rb:21:in `instrument'
activesupport (3.0.3) lib/active_support/notifications.rb:52:in `instrument'
actionmailer (3.0.3) lib/action_mailer/base.rb:399:in `deliver_mail'
mail (2.2.14) lib/mail/message.rb:228:in `deliver'
devise (1.1.5) lib/devise/models/recoverable.rb:31:in `send_reset_password_instructions'
devise (1.1.5) lib/devise/models/recoverable.rb:59:in `send_reset_password_instructions'
devise (1.1.5) app/controllers/devise/passwords_controller.rb:13:in `create'
actionpack (3.0.3) lib/action_controller/metal/implicit_render.rb:4:in `send_action'
actionpack (3.0.3) lib/abstract_controller/base.rb:151:in `process_action'
actionpack (3.0.3) lib/action_controller/metal/rendering.rb:11:in `process_action'
actionpack (3.0.3) lib/abstract_controller/callbacks.rb:18:in `block in process_action'
activesupport (3.0.3) lib/active_support/callbacks.rb:445:in `_run__987486545__process_action__562277861__callbacks'
activesupport (3.0.3) lib/active_support/callbacks.rb:409:in `_run_process_action_callbacks'
activesupport (3.0.3) lib/active_support/callbacks.rb:93:in `run_callbacks'
actionpack (3.0.3) lib/abstract_controller/callbacks.rb:17:in `process_action'
actionpack (3.0.3) lib/action_controller/metal/instrumentation.rb:30:in `block in process_action'
activesupport (3.0.3) lib/active_support/notifications.rb:52:in `block in instrument'
activesupport (3.0.3) lib/active_support/notifications/instrumenter.rb:21:in `instrument'
activesupport (3.0.3) lib/active_support/notifications.rb:52:in `instrument'
actionpack (3.0.3) lib/action_controller/metal/instrumentation.rb:29:in `process_action'
actionpack (3.0.3) lib/action_controller/metal/rescue.rb:17:in `process_action'
actionpack (3.0.3) lib/abstract_controller/base.rb:120:in `process'
actionpack (3.0.3) lib/abstract_controller/rendering.rb:40:in `process'
actionpack (3.0.3) lib/action_controller/metal.rb:138:in `dispatch'
actionpack (3.0.3) lib/action_controller/metal/rack_delegation.rb:14:in `dispatch'
actionpack (3.0.3) lib/action_controller/metal.rb:178:in `block in action'
actionpack (3.0.3) lib/action_dispatch/routing/route_set.rb:62:in `call'
actionpack (3.0.3) lib/action_dispatch/routing/route_set.rb:62:in `dispatch'
actionpack (3.0.3) lib/action_dispatch/routing/route_set.rb:27:in `call'
actionpack (3.0.3) lib/action_dispatch/routing/mapper.rb:35:in `call'
rack-mount (0.6.13) lib/rack/mount/route_set.rb:148:in `block in call'
rack-mount (0.6.13) lib/rack/mount/code_generation.rb:93:in `block in recognize'
rack-mount (0.6.13) lib/rack/mount/code_generation.rb:68:in `optimized_each'
rack-mount (0.6.13) lib/rack/mount/code_generation.rb:92:in `recognize'
rack-mount (0.6.13) lib/rack/mount/route_set.rb:139:in `call'
actionpack (3.0.3) lib/action_dispatch/routing/route_set.rb:492:in `call'
warden (1.0.3) lib/warden/manager.rb:35:in `block in call'
warden (1.0.3) lib/warden/manager.rb:34:in `catch'
warden (1.0.3) lib/warden/manager.rb:34:in `call'
actionpack (3.0.3) lib/action_dispatch/middleware/best_standards_support.rb:17:in `call'
actionpack (3.0.3) lib/action_dispatch/middleware/head.rb:14:in `call'
rack (1.2.1) lib/rack/methodoverride.rb:24:in `call'
actionpack (3.0.3) lib/action_dispatch/middleware/params_parser.rb:21:in `call'
actionpack (3.0.3) lib/action_dispatch/middleware/flash.rb:182:in `call'
actionpack (3.0.3) lib/action_dispatch/middleware/session/abstract_store.rb:149:in `call'
actionpack (3.0.3) lib/action_dispatch/middleware/cookies.rb:295:in `call'
activerecord (3.0.3) lib/active_record/query_cache.rb:32:in `block in call'
activerecord (3.0.3) lib/active_record/connection_adapters/abstract/query_cache.rb:28:in `cache'
activerecord (3.0.3) lib/active_record/query_cache.rb:12:in `cache'
activerecord (3.0.3) lib/active_record/query_cache.rb:31:in `call'
activerecord (3.0.3) lib/active_record/connection_adapters/abstract/connection_pool.rb:353:in `call'
actionpack (3.0.3) lib/action_dispatch/middleware/callbacks.rb:46:in `block in call'
activesupport (3.0.3) lib/active_support/callbacks.rb:415:in `_run_call_callbacks'
actionpack (3.0.3) lib/action_dispatch/middleware/callbacks.rb:44:in `call'
rack (1.2.1) lib/rack/sendfile.rb:107:in `call'
actionpack (3.0.3) lib/action_dispatch/middleware/remote_ip.rb:48:in `call'
actionpack (3.0.3) lib/action_dispatch/middleware/show_exceptions.rb:46:in `call'
railties (3.0.3) lib/rails/rack/logger.rb:13:in `call'
rack (1.2.1) lib/rack/runtime.rb:17:in `call'
activesupport (3.0.3) lib/active_support/cache/strategy/local_cache.rb:72:in `call'
rack (1.2.1) lib/rack/lock.rb:11:in `block in call'
<internal:prelude>:10:in `synchronize'
rack (1.2.1) lib/rack/lock.rb:11:in `call'
actionpack (3.0.3) lib/action_dispatch/middleware/static.rb:30:in `call'
railties (3.0.3) lib/rails/appl开发者_如何学JAVAication.rb:168:in `call'
railties (3.0.3) lib/rails/application.rb:77:in `method_missing'
railties (3.0.3) lib/rails/rack/log_tailer.rb:14:in `call'
rack (1.2.1) lib/rack/content_length.rb:13:in `call'
rack (1.2.1) lib/rack/handler/webrick.rb:52:in `service'
C:/Ruby192/lib/ruby/1.9.1/webrick/httpserver.rb:111:in `service'
C:/Ruby192/lib/ruby/1.9.1/webrick/httpserver.rb:70:in `run'
C:/Ruby192/lib/ruby/1.9.1/webrick/server.rb:183:in `block in start_thread'
WEBrick Trace:
Started GET "/users/password/new" for 127.0.0.1 at 2011-01-28 21:24:27 +0800
Processing by Devise::PasswordsController#new as HTML
Rendered devise/shared/_links.erb (31.2ms)
Rendered devise/passwords/new.html.erb within layouts/application (46.9ms)
Completed 200 OK in 78ms (Views: 62.5ms | ActiveRecord: 0.0ms)
Started POST "/users/password" for 127.0.0.1 at 2011-01-28 21:24:33 +0800
Processing by Devise::PasswordsController#create as HTML
Parameters: {"utf8"=>"✓", "authenticity_token"=>"gCzI+EQNzbAFqPHw+Z65ds8CQVggf8WeV5teiMFioNw=", "user"=>{"email"=>"tim.clark@newinti.edu.my"}, "commit"=>"Send me reset password instructions"}
[1m[36mSQL (15.6ms)[0m [1m SELECT name
FROM sqlite_master
WHERE type = 'table' AND NOT name = 'sqlite_sequence'
[0m
[1m[35mUser Load (0.0ms)[0m SELECT "users".* FROM "users" WHERE ("users"."email" = 'someemail@email.com') LIMIT 1
[1m[36mUser Load (0.0ms)[0m [1mSELECT "users".* FROM "users" WHERE ("users"."reset_password_token" = 'ju5YCBtBZe1_HM8Z0MmN') LIMIT 1[0m
[1m[35mAREL (0.0ms)[0m UPDATE "users" SET "reset_password_token" = 'ju5YCBtBZe1_HM8Z0MmN', "updated_at" = '2011-01-28 13:24:34.021484' WHERE ("users"."id" = 2)
Rendered devise/mailer/reset_password_instructions.html.erb (0.0ms)
Sent mail to someemail@email.com (1312ms)
Date: Fri, 28 Jan 2011 21:24:36 +0800
From: mail@mail.com
To: someemail@mail.com
Message-ID: <4d42c394a1a5d_34413f76a0837be@WIN-3EKEU5CNMMC.mail>
Subject: Reset password instructions
Mime-Version: 1.0
Content-Type: text/html;
charset=UTF-8
Content-Transfer-Encoding: 7bit
<p>Hello someemail@mail.com!</p>
<p>Someone has requested a link to change your password, and you can do this through the link below.</p>
<p><a href="http://127.0.0.1:25/users/password/edit?reset_password_token=ju5YCBtBZe1_HM8Z0MmN">Change my password</a></p>
<p>If you didn't request this, please ignore this email.</p>
<p>Your password won't change until you access the link above and create a new one.</p>
Completed in 4172ms
EOFError (end of file reached):
Rendered C:/Ruby192/lib/ruby/gems/1.9.1/gems/actionpack-3.0.3/lib/action_dispatch/middleware/templates/rescues/_trace.erb (0.0ms)
Rendered C:/Ruby192/lib/ruby/gems/1.9.1/gems/actionpack-3.0.3/lib/action_dispatch/middleware/templates/rescues/_request_and_response.erb (93.8ms)
Rendered C:/Ruby192/lib/ruby/gems/1.9.1/gems/actionpack-3.0.3/lib/action_dispatch/middleware/templates/rescues/diagnostics.erb within rescues/layout (109.4ms)
Are there other mail sending from Devise ? Confirmation mail ?
It seems to be your SMTP server that discards the connection while receiving it. If other mail pass through, it's probably an issue in the SMTP configuration. Check your SMTP logs (if you own it) to see if the mail is flagged as spam.
精彩评论