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
andopenssl
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
returned0
). - Restarting Sidekiq manually (
sv restart sidekiq
) failed because Sidekiq was missing as a service. - Redis was running (
redis-cli ping
returnedPONG
), 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:
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
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)
Checked Discourse logs:
grep "smtp" /shared/log/rails/production.log # No SMTP-related errors
- Redis connection failures (
Errno::ECONNREFUSED
inproduction.log
).
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
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