# Emails stop sending (Temporary failure in name resolution)

**URL:** https://meta.discourse.org/t/emails-stop-sending-temporary-failure-in-name-resolution/201942
**Category:** Support
**Created:** [August 27, 2021, 7:16pm UTC](https://meta.discourse.org/t/emails-stop-sending-temporary-failure-in-name-resolution/201942 "2021-08-27T19:16:06Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![Don](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/don/32/228726_2.png) [@Don](https://meta.discourse.org/u/Don)
#### Post date: [August 27, 2021, 7:16pm UTC](https://meta.discourse.org/t/emails-stop-sending-temporary-failure-in-name-resolution/201942/1 "2021-08-27T19:16:06Z")

</div>

Hello,

I updated in admin today to [189b4c4992](https://github.com/discourse/discourse/commits/189b4c49928cc90b929a23bcf6111f1054c2944f) and and since then the emails stop sending. I use Mailgun EU.

I have got this error in /logs `Job exception: getaddrinfo: Temporary failure in name resolution`  
And this in Sidekiq `Jobs::HandledExceptionWrapper: Wrapped SocketError: getaddrinfo: Temporary failure in name resolution`

Thank you for any help to fix this! 🙂

**Backtrace**

```plaintext
Job exception: getaddrinfo: Temporary failure in name resolution

/usr/local/lib/ruby/2.7.0/net/smtp.rb:539:in `initialize'
/usr/local/lib/ruby/2.7.0/net/smtp.rb:539:in `open'
/usr/local/lib/ruby/2.7.0/net/smtp.rb:539:in `tcp_socket'
/usr/local/lib/ruby/2.7.0/net/smtp.rb:549:in `block in do_start'
/usr/local/lib/ruby/2.7.0/timeout.rb:95:in `block in timeout'
/usr/local/lib/ruby/2.7.0/timeout.rb:105:in `timeout'
/usr/local/lib/ruby/2.7.0/net/smtp.rb:548:in `do_start'
/usr/local/lib/ruby/2.7.0/net/smtp.rb:518:in `start'
/var/www/discourse/vendor/bundle/ruby/2.7.0/bundler/gems/mail-5b700fc95ee6/lib/mail/network/delivery_methods/smtp.rb:109:in `start_smtp_session'
/var/www/discourse/vendor/bundle/ruby/2.7.0/bundler/gems/mail-5b700fc95ee6/lib/mail/network/delivery_methods/smtp.rb:100:in `deliver!'
/var/www/discourse/vendor/bundle/ruby/2.7.0/bundler/gems/mail-5b700fc95ee6/lib/mail/message.rb:2141:in `do_delivery'
/var/www/discourse/vendor/bundle/ruby/2.7.0/bundler/gems/mail-5b700fc95ee6/lib/mail/message.rb:253:in `block in deliver'
actionmailer-6.1.4.1/lib/action_mailer/base.rb:559:in `block in deliver_mail'
activesupport-6.1.4.1/lib/active_support/notifications.rb:203:in `block in instrument'
activesupport-6.1.4.1/lib/active_support/notifications/instrumenter.rb:24:in `instrument'
activesupport-6.1.4.1/lib/active_support/notifications.rb:203:in `instrument'
actionmailer-6.1.4.1/lib/action_mailer/base.rb:557:in `deliver_mail'
/var/www/discourse/vendor/bundle/ruby/2.7.0/bundler/gems/mail-5b700fc95ee6/lib/mail/message.rb:253:in `deliver'
actionmailer-6.1.4.1/lib/action_mailer/message_delivery.rb:119:in `block in deliver_now'
actionmailer-6.1.4.1/lib/action_mailer/rescuable.rb:17:in `handle_exceptions'
actionmailer-6.1.4.1/lib/action_mailer/message_delivery.rb:118:in `deliver_now'
/var/www/discourse/lib/email/sender.rb:267:in `send'
/var/www/discourse/app/jobs/regular/user_email.rb:83:in `send_user_email'
/var/www/discourse/app/jobs/regular/user_email.rb:38:in `execute'
/var/www/discourse/app/jobs/base.rb:232:in `block (2 levels) in perform'
rails_multisite-3.0.0/lib/rails_multisite/connection_management.rb:80:in `with_connection'
/var/www/discourse/app/jobs/base.rb:221:in `block in perform'
/var/www/discourse/app/jobs/base.rb:217:in `each'
/var/www/discourse/app/jobs/base.rb:217:in `perform'
sidekiq-6.2.2/lib/sidekiq/processor.rb:196:in `execute_job'
sidekiq-6.2.2/lib/sidekiq/processor.rb:164:in `block (2 levels) in process'
sidekiq-6.2.2/lib/sidekiq/middleware/chain.rb:138:in `block in invoke'
/var/www/discourse/lib/sidekiq/pausable.rb:138:in `call'
sidekiq-6.2.2/lib/sidekiq/middleware/chain.rb:140:in `block in invoke'
sidekiq-6.2.2/lib/sidekiq/middleware/chain.rb:143:in `invoke'
sidekiq-6.2.2/lib/sidekiq/processor.rb:163:in `block in process'
sidekiq-6.2.2/lib/sidekiq/processor.rb:136:in `block (6 levels) in dispatch'
sidekiq-6.2.2/lib/sidekiq/job_retry.rb:112:in `local'
sidekiq-6.2.2/lib/sidekiq/processor.rb:135:in `block (5 levels) in dispatch'
sidekiq-6.2.2/lib/sidekiq.rb:38:in `block in <module:Sidekiq>'
sidekiq-6.2.2/lib/sidekiq/processor.rb:131:in `block (4 levels) in dispatch'
sidekiq-6.2.2/lib/sidekiq/processor.rb:257:in `stats'
sidekiq-6.2.2/lib/sidekiq/processor.rb:126:in `block (3 levels) in dispatch'
sidekiq-6.2.2/lib/sidekiq/job_logger.rb:13:in `call'
sidekiq-6.2.2/lib/sidekiq/processor.rb:125:in `block (2 levels) in dispatch'
sidekiq-6.2.2/lib/sidekiq/job_retry.rb:79:in `global'
sidekiq-6.2.2/lib/sidekiq/processor.rb:124:in `block in dispatch'
sidekiq-6.2.2/lib/sidekiq/logger.rb:11:in `with'
sidekiq-6.2.2/lib/sidekiq/job_logger.rb:33:in `prepare'
sidekiq-6.2.2/lib/sidekiq/processor.rb:123:in `dispatch'
sidekiq-6.2.2/lib/sidekiq/processor.rb:162:in `process'
sidekiq-6.2.2/lib/sidekiq/processor.rb:78:in `process_one'
sidekiq-6.2.2/lib/sidekiq/processor.rb:68:in `run'
sidekiq-6.2.2/lib/sidekiq/util.rb:43:in `watchdog'
sidekiq-6.2.2/lib/sidekiq/util.rb:52:in `block in safe_thread'

```

---

<div class="post-metadata">

### Author: ![Simon\_Manning](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/simon_manning/32/198596_2.png) [@Simon\_Manning](https://meta.discourse.org/u/Simon_Manning)
#### Post date: [August 27, 2021, 7:26pm UTC](https://meta.discourse.org/t/emails-stop-sending-temporary-failure-in-name-resolution/201942/2 "2021-08-27T19:26:19Z")

</div>

Is your Discourse instance hosted with Linode? (Possibly Atlanta, specifically) I had this issue within the last hour or two with Linode’s default DNS server returning SERVFAIL when requesting any [mailgun.org](http://mailgun.org) domain.

I’m unclear as to why that was the case but I switched to Google DNS temporarily and after a while, (20-30 minutes, I think) Linode’s DNS started resolving [mailgun.org](http://mailgun.org) domains again.

---

<div class="post-metadata">

### Author: ![Don](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/don/32/228726_2.png) [@Don](https://meta.discourse.org/u/Don)
#### Post date: [August 27, 2021, 7:31pm UTC](https://meta.discourse.org/t/emails-stop-sending-temporary-failure-in-name-resolution/201942/3 "2021-08-27T19:31:18Z")

</div>

Hi Simon,  
Thanks for the quick reply. 🙂  
I hosting with Vultr Frankfurt. Never happened this before. Only when Mailgun crashed but I checked it and seems to All Systems Operational.

---

<div class="post-metadata">

### Author: ![Simon\_Manning](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/simon_manning/32/198596_2.png) [@Simon\_Manning](https://meta.discourse.org/u/Simon_Manning)
#### Post date: [August 27, 2021, 7:42pm UTC](https://meta.discourse.org/t/emails-stop-sending-temporary-failure-in-name-resolution/201942/4 "2021-08-27T19:42:57Z")

</div>

I wonder if there is a DNS problem with the provider Mailgun use. DNS caching can be kinda funky so one name server might get hit by a problem almost immediately while another never notices it, or at least doesn’t propagate it.

Google’s public DNS (8.8.8.8) appears to still be resolving it correctly so switching to that temporarily or adding it as a permanent fallback on your server should get your emails sending again.

---

<div class="post-metadata">

### Author: ![Don](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/don/32/228726_2.png) [@Don](https://meta.discourse.org/u/Don)
#### Post date: [August 28, 2021, 3:53am UTC](https://meta.discourse.org/t/emails-stop-sending-temporary-failure-in-name-resolution/201942/5 "2021-08-28T03:53:09Z")

</div>

Thank you Simon! 🙂 It works perfect! ❤

---

<div class="post-metadata">

### Author: ![system](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/system/32/443519_2.png) [@system](https://meta.discourse.org/u/system)
#### Post date: [September 27, 2021, 3:53am UTC](https://meta.discourse.org/t/emails-stop-sending-temporary-failure-in-name-resolution/201942/6 "2021-09-27T03:53:49Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
