Error: "There are 965 email jobs that failed. Check your app.yml and ensure that the mail server settings are correct."

סיכום מבוסס בינה מלאכותית

Knigel reported a critical email failure on their self-hosted Discourse instance, where Sidekiq jobs like Jobs::UserEmail and Jobs::VersionCheck were failing with SocketError: getaddrinfo: No address associated with hostname errors. Despite the server appearing functional, new account registrations failed to send confirmation emails. david suggested the issue stemmed from a temporary loss of DNS service and advised checking connectivity via SSH. Knigel confirmed that recent jobs were still failing and that no recent configuration changes had been made. Following david’s guidance, Knigel verified that ping discourse.org worked correctly. When david suggested manually triggering the Jobs::VersionCheck job via the Sidekiq scheduler, Knigel reported that the trigger also failed. Although Knigel located the app.yml file at /var/discourse/containers/app.yml, no obvious misconfigurations were found. david then recommended using the host api.discourse.org command to verify DNS resolution specifically for the API domain. Knigel confirmed that the host command returned the expected IP addresses, indicating DNS was resolving correctly at that moment. With standard troubleshooting exhausted, david suggested a server reboot as a final measure. Knigel implemented this solution, noting that the reboot successfully restored email functionality, and thanked the community for their assistance.

Hi there, woke up this morning to some sort of email error. My Discourse seemed to be running fine until this.

In Sidekiq, I get many errors such as this:

"16 	default 	Jobs::UserEmail 	
{"type"=>"digest", "user_id"=>8, "current_site_id"=>"default"}

Jobs::HandledExceptionWrapper: Wrapped SocketError: getaddrinfo: No address associated with hostname"

Also this one:

"5 	default 	Jobs::VersionCheck 	
{}
	
Jobs::HandledExceptionWrapper: Wrapped SocketError: Failed to open TCP connection to api.discourse.org:443 (getaddrinfo: No address associated with hostname)"

I’m not sure how to access the app.yml to check. Can’t seem to find it.

Thanks for your help!

Kinda looks like your server lost DNS service at some point overnight…

When was the last job that failed? Have more recent jobs succeeded?

Thanks for the response, more recent jobs don’t seem to be working. Tried to set up a new account and received an error instead of getting a successful email. What’s strange is that I did not do any work on the site recently or change settings.

Can you log into your server via SSH? If so, try running

ping discourse.org

and see if that works.

Yes, ping seems to work fine,

Hmm, if the jobs are still failing then I’m not really sure what to suggest. You could try running one manually by going to sidekiq, “scheduler”, then find “Jobs::VersionCheck” and click “Trigger”.

The app.yml file is at /var/discourse/containers/app.yml, but since the errors are with the DNS resolution I’m not sure that’ll help.

Yes, that trigger failed as well. I have found my app.yml file and can’t see anything that stands out that would cause failure.

Again, I appreciate your help.

Maybe try looking up the exact domain name that’s failing? So:

host api.discourse.org

You should get something like

api.discourse.org is an alias for corp.discourse.org.
corp.discourse.org has address 64.71.168.251
corp.discourse.org has IPv6 address 2001:470:1:3a8::251

sorry, where would I check that?

SSH into the server and run

host api.discourse.org

(the same way you did ping earlier)

Ah yes, I get what you said I should get as a result

Other than trying a reboot on your server, I’m not sure I have any other suggestions - sorry. :frowning:

Hopefully someone else will have some ideas.

Well, I should have started with the old turn it off and on routine. That seemed to work and emails are coming through. Thanks very much for your help. Major kudos!