开发者

Errno::EAFNOSUPPORT (Address family not supported by protocol - socket(2)):

Errno::EAFNOSUPPORT (Address family not supported by protocol - socket(2)): 

Error message from Heroku, devise, sendgrid. Hoping someon开发者_运维问答e can explain and help me fix.

And now its this:

Net::SMTPAuthenticationError (535 5.7.8 Error: authentication failed: authentication failure):

update

I answered my own question.


These errors were not very descriptive. In fact the problem was that sendgrid had not provisioned this account until several hours after it was created thus trying to use devise with sendgrid on heroku didn't work for quite some times. Took over night for me.

Solution: Give it time :( not what you wanted to hear but its true :)


A similar error occured to me when I forgot to provision SMTP domain/address environment variables for the mail gem and it defaulted to nil or not good values.

I'm talking about these guys

# config/environments/*.rb
config.action_mailer.smtp_settings = {
    port: ENV['SMTP_PORT'],
    address: ENV['SMTP_HOST'],
    domain: ENV['SMTP_DOMAIN'],
  }.tap do |settings|
    if ENV['SMTP_USER'].present? || ENV['SMTP_PASSWORD'].present?
      settings[:user_name] = ENV['SMTP_USER']
      settings[:password] = ENV['SMTP_PASSWORD']
      settings[:authentication] = ENV['SMTP_AUTHENTICATION'] || :cram_md5
    end
  end

It made me waste a lot of time thinking there was a problem with ipv6 (we recently reinstalled our k8s cluster without ipv6 support and had similar problems with other applications)

... and even more when I stumbled across some github issue comment from 2019 mentioning the net SMTP gem had problems with ipv6 =_=

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜