Issues with Discourse 3.5.0.beta2-dev - SMTP and Background Jobs

The following report was prepared for me by ChatGPT, based on my actual experience installing Discourse (not being very tech savvy myself, I’ve being relying on AI for help with tasks that I find difficult). I don’t need any help for now but I hope that the report may prove to be useful feedback about 3.5.0.beta2-dev.

==================

Dear Discourse Team,

I want to share some troubleshooting details about email issues I faced while running Discourse 3.5.0.beta2-dev. I don’t need direct assistance since I’ve decided to revert to 3.4.0.beta4-dev, but I hope this report is useful for identifying potential issues with the latest development version.


1. Problem Summary

I performed a clean installation of Discourse on a new Vultr instance, using 20i’s SMTP service (smtp.stackmail.com ). However, emails were never delivered, despite:

  • A successful SMTP connectivity test (openssl s_client -connect smtp.stackmail.com:587 -starttls smtp ).
  • No errors appearing in 20i’s mail logs (suggesting Discourse wasn’t actually sending emails).
  • Sidekiq failing to process email jobs.

This was unexpected because a few weeks ago, I successfully installed Discourse 3.4.0.beta4-dev on an identical instance without any email issues.

After thorough debugging, I discovered that my current installation had unexpectedly installed Discourse 3.5.0.beta2-dev, which likely contributed to the problems.


2. Key Issues Identified

A. Emails Were Not Being Delivered

  • SMTP settings were correct, verified via manual testing (swaks and openssl tests succeeded).
  • Emails were enqueued in Sidekiq but never received.
  • 20i’s mail logs showed no rejection or delivery attempts (suggesting the messages never left Discourse).
  • No email-related errors appeared in production.log (grep "smtp" returned nothing).

B. Sidekiq and Redis Issues

  • Initially, Sidekiq was not running (Sidekiq::Workers.new.size returned 0 ).
  • Restarting Sidekiq manually (sv restart sidekiq ) failed because Sidekiq was missing as a service.
  • Redis was running (redis-cli ping returned PONG ), but Discourse logs still showed Redis connection errors (Errno::ECONNREFUSED ).
  • Sidekiq logs indicated job failures due to Redis connection issues, even though Redis was confirmed to be active.
  • Manually starting Sidekiq (bundle exec sidekiq ) allowed jobs to process, but emails still did not send.

C. Version Mismatch Between Installations

  • My previous installation (which worked) was on 3.4.0.beta4-dev.
  • My current installation unexpectedly installed 3.5.0.beta2-dev, despite using the same setup method.
  • Since email worked perfectly in 3.4.0.beta4-dev, I suspect a regression or breaking change in 3.5.

3. Actions Taken (All Failed)

We systematically tried the following solutions:

:white_check_mark: Confirmed SMTP connectivity with:

openssl s_client -connect smtp.stackmail.com:587 -starttls smtp  # Successful
swaks --to my-email --server smtp.stackmail.com --port 587 --auth LOGIN  # Successful

:white_check_mark: Verified that emails were enqueued:

Jobs.enqueue(:user_email, type: :test_message, to_address: 'masden@kumagaku.ac.jp')  # Returned a job ID
Sidekiq::Queue.new("default").size  # Returned 0 (indicating the job was processed)

:white_check_mark: Checked Discourse logs:

grep "smtp" /shared/log/rails/production.log  # No SMTP-related errors
  • Redis connection failures (Errno::ECONNREFUSED in production.log ).

:white_check_mark: Restarted and manually triggered services:

sv restart sidekiq  # Failed, service missing
redis-cli ping  # Confirmed running
bundle exec sidekiq  # Jobs processed but no emails sent

:white_check_mark: Checked if emails were being blocked by 20i:

  • No rejections or delivery attempts in 20i mail logs.
  • If emails were being rejected, there should be a log entry, but nothing appeared.

4. Conclusion: Rolling Back to 3.4.0.beta4-dev

After extensive troubleshooting, I have decided to wipe the installation and reinstall 3.4.0.beta4-dev, since my previous install worked flawlessly on that version.

While I don’t need direct help, I wanted to report these issues because:

  • Email handling might have changed in 3.5, preventing SMTP handoff.
  • Sidekiq’s missing service and Redis errors suggest background job processing problems in 3.5.
  • Since I was able to install 3.4.0.beta4-dev without issues, this suggests a possible regression in 3.5.

I hope this report is helpful for identifying potential issues in Discourse 3.5.0.beta2-dev.

Best regards,
Kirk

1 Like

That was expected, because it is nowadays version.

Quite many is using same latest version, and sidekiq works, and therefore emails too.

So you might need help, because then you can’t rebuild either.

And much better knowing may take over this topic, but I would say we have here topics about stopped sidekiq. The search may help.