Homeland Homeland 邮件配置使用 gmail 报如下错误

caohuan346 · 2019年11月09日 · 最后由 tinyfeng 回复于 2019年11月11日 · 275 次阅读

各位大大,Homeland邮件配置使用gmail报如下错误,收不到邮件是哪里问题呢?

#<Net::OpenTimeout: execution expired>


/usr/local/lib/ruby/2.6.0/net/smtp.rb:539:in `initialize'
/usr/local/lib/ruby/2.6.0/net/smtp.rb:539:in `open'
/usr/local/lib/ruby/2.6.0/net/smtp.rb:539:in `tcp_socket'
/usr/local/lib/ruby/2.6.0/net/smtp.rb:549:in `block in do_start'
/usr/local/lib/ruby/2.6.0/timeout.rb:103:in `timeout'
/usr/local/lib/ruby/2.6.0/net/smtp.rb:548:in `do_start'
/usr/local/lib/ruby/2.6.0/net/smtp.rb:518:in `start'
/home/app/homeland/vendor/bundle/ruby/2.6.0/gems/mail-2.7.1/lib/mail/network/delivery_methods/smtp.rb:109:in `start_smtp_session'
/home/app/homeland/vendor/bundle/ruby/2.6.0/gems/mail-2.7.1/lib/mail/network/delivery_methods/smtp.rb:100:in `deliver!'
/home/app/homeland/vendor/bundle/ruby/2.6.0/gems/mail-2.7.1/lib/mail/message.rb:2159:in `do_delivery'
/home/app/homeland/vendor/bundle/ruby/2.6.0/gems/mail-2.7.1/lib/mail/message.rb:260:in `block in deliver'
/home/app/homeland/vendor/bundle/ruby/2.6.0/gems/actionmailer-6.0.0/lib/action_mailer/base.rb:589:in `block in deliver_mail'
/home/app/homeland/vendor/bundle/ruby/2.6.0/gems/activesupport-6.0.0/lib/active_support/notifications.rb:180:in `block in instrument'
/home/app/homeland/vendor/bundle/ruby/2.6.0/gems/activesupport-6.0.0/lib/active_support/notifications/instrumenter.rb:24:in `instrument'
/home/app/homeland/vendor/bundle/ruby/2.6.0/gems/activesupport-6.0.0/lib/active_support/notifications.rb:180:in `instrument'
/home/app/homeland/vendor/bundle/ruby/2.6.0/gems/actionmailer-6.0.0/lib/action_mailer/base.rb:587:in `deliver_mail'
/home/app/homeland/vendor/bundle/ruby/2.6.0/gems/mail-2.7.1/lib/mail/message.rb:260:in `deliver'
/home/app/homeland/vendor/bundle/ruby/2.6.0/gems/actionmailer-6.0.0/lib/action_mailer/message_delivery.rb:114:in `block in deliver_now'
/home/app/homeland/vendor/bundle/ruby/2.6.0/gems/actionmailer-6.0.0/lib/action_mailer/rescuable.rb:17:in `handle_exceptions'
/home/app/homeland/vendor/bundle/ruby/2.6.0/gems/actionmailer-6.0.0/lib/action_mailer/message_delivery.rb:113:in `deliver_now'
/home/app/homeland/vendor/bundle/ruby/2.6.0/gems/actionmailer-6.0.0/lib/action_mailer/mail_delivery_job.rb:18:in `perform'
/home/app/homeland/vendor/bundle/ruby/2.6.0/gems/activejob-6.0.0/lib/active_job/execution.rb:39:in `block in perform_now'
/home/app/homeland/vendor/bundle/ruby/2.6.0/gems/activesupport-6.0.0/lib/active_support/callbacks.rb:112:in `block in run_callbacks'
/home/app/homeland/vendor/bundle/ruby/2.6.0/gems/i18n-1.6.0/lib/i18n.rb:297:in `with_locale'
/home/app/homeland/vendor/bundle/ruby/2.6.0/gems/activejob-6.0.0/lib/active_job/translation.rb:9:in `block (2 levels) in <module:Translation>'
/home/app/homeland/vendor/bundle/ruby/2.6.0/gems/activesupport-6.0.0/lib/active_support/callbacks.rb:121:in `instance_exec'
/home/app/homeland/vendor/bundle/ruby/2.6.0/gems/activesupport-6.0.0/lib/active_support/callbacks.rb:121:in `block in run_callbacks'
/home/app/homeland/vendor/bundle/ruby/2.6.0/gems/activesupport-6.0.0/lib/active_support/core_ext/time/zones.rb:66:in `use_zone'
/home/app/homeland/vendor/bundle/ruby/2.6.0/gems/activejob-6.0.0/lib/active_job/timezones.rb:9:in `block (2 levels) in <module:Timezones>'
/home/app/homeland/vendor/bundle/ruby/2.6.0/gems/activesupport-6.0.0/lib/active_support/callbacks.rb:121:in `instance_exec'
/home/app/homeland/vendor/bundle/ruby/2.6.0/gems/activesupport-6.0.0/lib/active_support/callbacks.rb:121:in `block in run_callbacks'
/home/app/homeland/vendor/bundle/ruby/2.6.0/gems/activejob-6.0.0/lib/active_job/logging.rb:25:in `block (4 levels) in <module:Logging>'
/home/app/homeland/vendor/bundle/ruby/2.6.0/gems/activesupport-6.0.0/lib/active_support/notifications.rb:180:in `block in instrument'
/home/app/homeland/vendor/bundle/ruby/2.6.0/gems/activesupport-6.0.0/lib/active_support/notifications/instrumenter.rb:24:in `instrument'
/home/app/homeland/vendor/bundle/ruby/2.6.0/gems/activesupport-6.0.0/lib/active_support/notifications.rb:180:in `instrument'
/home/app/homeland/vendor/bundle/ruby/2.6.0/gems/activejob-6.0.0/lib/active_job/logging.rb:24:in `block (3 levels) in <module:Logging>'
/home/app/homeland/vendor/bundle/ruby/2.6.0/gems/activejob-6.0.0/lib/active_job/logging.rb:45:in `block in tag_logger'
/home/app/homeland/vendor/bundle/ruby/2.6.0/gems/activesupport-6.0.0/lib/active_support/tagged_logging.rb:80:in `block in tagged'
/home/app/homeland/vendor/bundle/ruby/2.6.0/gems/activesupport-6.0.0/lib/active_support/tagged_logging.rb:28:in `tagged'
/home/app/homeland/vendor/bundle/ruby/2.6.0/gems/activesupport-6.0.0/lib/active_support/tagged_logging.rb:80:in `tagged'
/home/app/homeland/vendor/bundle/ruby/2.6.0/gems/activejob-6.0.0/lib/active_job/logging.rb:45:in `tag_logger'
/home/app/homeland/vendor/bundle/ruby/2.6.0/gems/activejob-6.0.0/lib/active_job/logging.rb:21:in `block (2 levels) in <module:Logging>'
/home/app/homeland/vendor/bundle/ruby/2.6.0/gems/activesupport-6.0.0/lib/active_support/callbacks.rb:121:in `instance_exec'
/home/app/homeland/vendor/bundle/ruby/2.6.0/gems/activesupport-6.0.0/lib/active_support/callbacks.rb:121:in `block in run_callbacks'
/home/app/homeland/vendor/bundle/ruby/2.6.0/gems/activesupport-6.0.0/lib/active_support/callbacks.rb:139:in `run_callbacks'
/home/app/homeland/vendor/bundle/ruby/2.6.0/gems/activejob-6.0.0/lib/active_job/execution.rb:38:in `perform_now'
/home/app/homeland/vendor/bundle/ruby/2.6.0/gems/activejob-6.0.0/lib/active_job/execution.rb:24:in `block in execute'
/home/app/homeland/vendor/bundle/ruby/2.6.0/gems/activesupport-6.0.0/lib/active_support/callbacks.rb:112:in `block in run_callbacks'
/home/app/homeland/vendor/bundle/ruby/2.6.0/gems/activejob-6.0.0/lib/active_job/railtie.rb:43:in `block (4 levels) in <class:Railtie>'
/home/app/homeland/vendor/bundle/ruby/2.6.0/gems/activesupport-6.0.0/lib/active_support/execution_wrapper.rb:88:in `wrap'
/home/app/homeland/vendor/bundle/ruby/2.6.0/gems/activesupport-6.0.0/lib/active_support/reloader.rb:72:in `block in wrap'
/home/app/homeland/vendor/bundle/ruby/2.6.0/gems/activesupport-6.0.0/lib/active_support/execution_wrapper.rb:84:in `wrap'
/home/app/homeland/vendor/bundle/ruby/2.6.0/gems/activesupport-6.0.0/lib/active_support/reloader.rb:71:in `wrap'
/home/app/homeland/vendor/bundle/ruby/2.6.0/gems/activejob-6.0.0/lib/active_job/railtie.rb:42:in `block (3 levels) in <class:Railtie>'
/home/app/homeland/vendor/bundle/ruby/2.6.0/gems/activesupport-6.0.0/lib/active_support/callbacks.rb:121:in `instance_exec'
/home/app/homeland/vendor/bundle/ruby/2.6.0/gems/activesupport-6.0.0/lib/active_support/callbacks.rb:121:in `block in run_callbacks'
/home/app/homeland/vendor/bundle/ruby/2.6.0/gems/activesupport-6.0.0/lib/active_support/callbacks.rb:139:in `run_callbacks'
/home/app/homeland/vendor/bundle/ruby/2.6.0/gems/activejob-6.0.0/lib/active_job/execution.rb:22:in `execute'
/home/app/homeland/vendor/bundle/ruby/2.6.0/gems/activejob-6.0.0/lib/active_job/queue_adapters/sidekiq_adapter.rb:42:in `perform'
/home/app/homeland/vendor/bundle/ruby/2.6.0/gems/sidekiq-5.2.7/lib/sidekiq/processor.rb:192:in `execute_job'
/home/app/homeland/vendor/bundle/ruby/2.6.0/gems/sidekiq-5.2.7/lib/sidekiq/processor.rb:165:in `block (2 levels) in process'
/home/app/homeland/vendor/bundle/ruby/2.6.0/gems/sidekiq-5.2.7/lib/sidekiq/middleware/chain.rb:128:in `block in invoke'
/home/app/homeland/vendor/bundle/ruby/2.6.0/gems/sidekiq-5.2.7/lib/sidekiq/middleware/chain.rb:133:in `invoke'
/home/app/homeland/vendor/bundle/ruby/2.6.0/gems/sidekiq-5.2.7/lib/sidekiq/processor.rb:164:in `block in process'
/home/app/homeland/vendor/bundle/ruby/2.6.0/gems/sidekiq-5.2.7/lib/sidekiq/processor.rb:137:in `block (6 levels) in dispatch'
/home/app/homeland/vendor/bundle/ruby/2.6.0/gems/sidekiq-5.2.7/lib/sidekiq/job_retry.rb:109:in `local'
/home/app/homeland/vendor/bundle/ruby/2.6.0/gems/sidekiq-5.2.7/lib/sidekiq/processor.rb:136:in `block (5 levels) in dispatch'
/home/app/homeland/vendor/bundle/ruby/2.6.0/gems/sidekiq-5.2.7/lib/sidekiq/rails.rb:43:in `block in call'
/home/app/homeland/vendor/bundle/ruby/2.6.0/gems/activesupport-6.0.0/lib/active_support/execution_wrapper.rb:88:in `wrap'
/home/app/homeland/vendor/bundle/ruby/2.6.0/gems/activesupport-6.0.0/lib/active_support/reloader.rb:72:in `block in wrap'
/home/app/homeland/vendor/bundle/ruby/2.6.0/gems/activesupport-6.0.0/lib/active_support/execution_wrapper.rb:88:in `wrap'
/home/app/homeland/vendor/bundle/ruby/2.6.0/gems/activesupport-6.0.0/lib/active_support/reloader.rb:71:in `wrap'
/home/app/homeland/vendor/bundle/ruby/2.6.0/gems/sidekiq-5.2.7/lib/sidekiq/rails.rb:42:in `call'
/home/app/homeland/vendor/bundle/ruby/2.6.0/gems/sidekiq-5.2.7/lib/sidekiq/processor.rb:132:in `block (4 levels) in dispatch'
/home/app/homeland/vendor/bundle/ruby/2.6.0/gems/sidekiq-5.2.7/lib/sidekiq/processor.rb:250:in `stats'
/home/app/homeland/vendor/bundle/ruby/2.6.0/gems/sidekiq-5.2.7/lib/sidekiq/processor.rb:127:in `block (3 levels) in dispatch'
/home/app/homeland/vendor/bundle/ruby/2.6.0/gems/sidekiq-5.2.7/lib/sidekiq/job_logger.rb:8:in `call'
/home/app/homeland/vendor/bundle/ruby/2.6.0/gems/sidekiq-5.2.7/lib/sidekiq/processor.rb:126:in `block (2 levels) in dispatch'
/home/app/homeland/vendor/bundle/ruby/2.6.0/gems/sidekiq-5.2.7/lib/sidekiq/job_retry.rb:74:in `global'
/home/app/homeland/vendor/bundle/ruby/2.6.0/gems/sidekiq-5.2.7/lib/sidekiq/processor.rb:125:in `block in dispatch'
/home/app/homeland/vendor/bundle/ruby/2.6.0/gems/sidekiq-5.2.7/lib/sidekiq/logging.rb:48:in `with_context'
/home/app/homeland/vendor/bundle/ruby/2.6.0/gems/sidekiq-5.2.7/lib/sidekiq/logging.rb:42:in `with_job_hash_context'
/home/app/homeland/vendor/bundle/ruby/2.6.0/gems/sidekiq-5.2.7/lib/sidekiq/processor.rb:124:in `dispatch'
/home/app/homeland/vendor/bundle/ruby/2.6.0/gems/sidekiq-5.2.7/lib/sidekiq/processor.rb:163:in `process'
/home/app/homeland/vendor/bundle/ruby/2.6.0/gems/sidekiq-5.2.7/lib/sidekiq/processor.rb:83:in `process_one'
/home/app/homeland/vendor/bundle/ruby/2.6.0/gems/sidekiq-5.2.7/lib/sidekiq/processor.rb:71:in `run'
/home/app/homeland/vendor/bundle/ruby/2.6.0/gems/sidekiq-5.2.7/lib/sidekiq/util.rb:16:in `watchdog'
/home/app/homeland/vendor/bundle/ruby/2.6.0/gems/sidekiq-5.2.7/lib/sidekiq/util.rb:25:in `block in safe_thread'

共收到 7 条回复

OpenTimeout

Timeout

pynix 回复

嗯嗯,配置如下,就是不知道为啥超时

mailer_provider=smtp
mailer_sender=xxxx@gmail.com
mailer_options_address=smtp.gmail.com
mailer_options_port=587
mailer_options_domain=gmail.com
mailer_options_user_name=xxxx@gmail.com
mailer_options_password=xxxxx
mailer_options_authentication=plain
mailer_options_enable_starttls_auto=true

天朝连不到gmail的server很正常的吧

天朝上国。。。

需要 登录 后方可回复, 如果你还没有账号请点击这里 注册