So… i’ve been at this for around 6 hours and thought to finally reach out for a bit of help.
I’ve setup discourse on a server, launched the container and attempted to sign up my 1st admin account.
The issue: I’m not getting the signup email.
What I have done:
- Made sure SMTP is configured correctly in the settings, and used an online test tool SMTP Test Tool to confirm those settings work, and it does. (using that website)
DISCOURSE_SMTP_ADDRESS: MY_SMTP_HOST
DISCOURSE_SMTP_PORT: 587
DISCOURSE_SMTP_USER_NAME: MY_SMTP_USERNAME
DISCOURSE_SMTP_PASSWORD: MY_SMTP_PASSWORD
DISCOURSE_SMTP_ENABLE_START_TLS: true # (optional, default true)
-
Ensured that only one email is setup for initial configuration of admin accounts
-
checked that SSL is infact working (it is!)
-
tried a fresh reinstall twice of ubuntu and to follow the guide posted online for setup.
-
checked that there are no network firewalls that are blocking anything outgoing / incoming.
-
I was able to successfully telnet to my smtp server from the server hosting discourse.
-
have the aditional
- exec: rails r "SiteSetting.notification_email='noreply@MY_WEB_SITE'"
setup correctly at the end of the app.yml
I don’t know what else to try at this point, Thank you.
إعجابَين (2)
If You run discourse-doctor then does it give you some obvious error?
cd /var/discourse
./discourse-doctor
إعجاب واحد (1)
Ah yes, i forgot to mention that. One moment let me re-run it to grab the output that I noticed.
==================== MAIL TEST ====================
For a robust test, get an address from http://www.mail-tester.com/
Or just send a test message to yourself.
Email address for mail test? ('n' to skip) [MY_EMAIL]:
Sending mail to MY_EMAIL. . .
Testing sending to MY_EMAIL using smtp.MY_SMTP:587.
SMTP server connection successful.
Sending to MY_EMAIL. . .
Sending mail failed.
Replacing: SMTP_PASSWORD
Replacing: LETSENCRYPT_ACCOUNT_EMAIL
Replacing: DEVELOPER_EMAILS
Replacing: DISCOURSE_DB_PASSWORD
Replacing: Sending mail to
==================== DONE! ====================
Would you like to serve a publicly available version of this file? (Y/n)
I notice for some reason Sending mail failed.
even though the SMTP server connection was successful
إعجاب واحد (1)
If your password somehow contains some special characters, have you tried enclosing the password in quotes?
إعجاب واحد (1)
It was previously encased in quotes, but I was following a guide online that didn’t have it in quotes, I will try with it again in double quotes "
Rebuilding right now.
Alright, it’s back up. one moment.
Same error:
==================== MAIL TEST ====================
For a robust test, get an address from http://www.mail-tester.com/
Or just send a test message to yourself.
Email address for mail test? ('n' to skip) [MY_EMAIL]: MY_EMAIL
Sending mail to MY_EMAIL. . .
Testing sending to MY_EMAIL using MY_SMTP_SERVER:587.
SMTP server connection successful.
Sending to MY_EMAIL. . .
Sending mail failed.
Replacing: SMTP_PASSWORD
Replacing: LETSENCRYPT_ACCOUNT_EMAIL
Replacing: DEVELOPER_EMAILS
Replacing: DISCOURSE_DB_PASSWORD
Replacing: Sending mail to
==================== DONE! ====================
Would you like to serve a publicly available version of this file? (Y/n)n
Publicly available log not generated.
You can examine the output of this script with
LESS=-Ri less /tmp/discourse-debug.txt
BUT FIRST, make sure that you know the first three commands below!!!
Commands to know when viewing the file with the above command (called 'less'):
q -- quit
/error<ENTER> -- search for the word 'error'
n -- search for the next occurrence
g -- go to the beginning of the file
f -- go forward a page
b -- go back a page
G -- go to the end of the file
إعجاب واحد (1)
Tried it with a standard password with no characters, tried it with and without the quotes, still no change with the result.
Sending mail failed.
I’ll suggest you try configuring mailgun.
إعجاب واحد (1)
I’ll try that now. Thanks.
Before trying that, i will try Discourse app.yml doesn't like email password contain "#" by having double quotes around the password, then finally setting a password that doesnt use any special chars.
If that doesn’t work, ill configure mailgun. (as a last resort because my current email server has many emails on it.
إعجاب واحد (1)
PROGRESS! a new error message came up after double quoting the password like this "'mypass'"
==================== MAIL TEST ====================
For a robust test, get an address from http://www.mail-tester.com/
Or just send a test message to yourself.
Email address for mail test? ('n' to skip) [sender_email]: my_email
Sending mail to my_email. . .
Testing sending to my_email using my_smtp:587.
======================================== ERROR ========================================
UNEXPECTED ERROR
SMTP-AUTH requested but missing secret phrase
====================================== SOLUTION =======================================
This is not a common error. No recommended solution exists!
Please report the exact error message above to https://meta.discourse.org/
(And a solution, if you find one!)
=======================================================================================
Replacing: SMTP_PASSWORD
Replacing: LETSENCRYPT_ACCOUNT_EMAIL
Replacing: DEVELOPER_EMAILS
Replacing: DISCOURSE_DB_PASSWORD
Replacing: Sending mail to
==================== DONE! ====================
Would you like to serve a publicly available version of this file? (Y/n)
إعجاب واحد (1)
Manually using telnet to send an email seems to be working, but not when using the discourse emails so something seems to be amiss.
إعجاب واحد (1)
in the production.log
i found this, would this be causing it?
Error connecting to Redis on localhost:6379 (Errno::EADDRNOTAVAIL) subscribe failed, reconnecting in 1 second. Call stack ["/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/redis-4.1.3/lib/redis/client.rb:362$
Job exception: Error connecting to Redis on localhost:6379 (Errno::EADDRNOTAVAIL)
Job exception: Error connecting to Redis on localhost:6379 (Errno::EADDRNOTAVAIL)
Job exception: Error connecting to Redis on localhost:6379 (Errno::EADDRNOTAVAIL)
Job exception: Error connecting to Redis on localhost:6379 (Errno::EADDRNOTAVAIL)
Job exception: Error connecting to Redis on localhost:6379 (Errno::EADDRNOTAVAIL)
Error connecting to Redis on localhost:6379 (Errno::EADDRNOTAVAIL) subscribe failed, reconnecting in 1 second. Call stack ["/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/redis-4.1.3/lib/redis/client.rb:362$
Job exception: Error connecting to Redis on localhost:6379 (Errno::EADDRNOTAVAIL)
Error connecting to Redis on localhost:6379 (Errno::EADDRNOTAVAIL) subscribe failed, reconnecting in 1 second. Call stack ["/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/redis-4.1.3/lib/redis/client.rb:362$
Job exception: Error connecting to Redis on localhost:6379 (Errno::EADDRNOTAVAIL)
Further digging has found Job exception: SSL_connect returned=1 errno=0 state=error: dh key too small
so looks like the mailserver’s SSL is having issues. mailgun time.
إعجابَين (2)