-
Notifications
You must be signed in to change notification settings - Fork 209
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Internal error on sending email after a new autolab installation #2168
Comments
Could you try configuring Autolab via Manage Autolab > Configure Autolab > SMTP Config instead? ![]() With #2028, the way SMTP settings are configured was changed, looks like the documentation needs updating. Sorry for the trouble! |
I updated the email settings via "Manage Autolab" and now everything is working correctly. Sorry I didn't realize that the settings in this version are no longer done in the .env file. Really, the documentation needs a little updating. Thank you very much! |
That's great to hear! We'll keep this issue open until we update the documentation. |
As the problem was solved, I'll close this issue. Thank you! |
OK, reopening the issue until the update on documentation. Thanks! |
(For developer reference) Since #2028, the following vars are now read from the config file (see diff of
Thus, they should be removed from the docker Things to note
CC @20wildmanj |
Your environment
Let us know details such as
Steps To Reproduce
Steps to reproduce the behavior:
Current behavior
When I try to test e-mail using the "Forgot your password" feature, on https://autolab.computacaoraiz.com.br, an Error 500 Internal Server Error is triggered. Our currently email configuration, in
.env
file is this:`# SMTP SETTINGS
SMTP_SETTINGS_ADDRESS=smtp.gmail.com
SMTP_SETTINGS_PORT=587
SMTP_SETTINGS_ENABLE_STARTTLS_AUTO=true
SMTP_SETTINGS_AUTHENTICATION=login
SMTP_SETTINGS_USER_NAME=our_user_name
SMTP_SETTINGS_PASSWORD=our_password
SMTP_SETTINGS_DOMAIN=computacaoraiz.com.br
SMTP_DEFAULT_FROM=[email protected]
HOST_PROTOCOL=http
HOST_DOMAIN=autolab.computacaoraiz.com.br`
This same configuration are working as expected on the old server, with Autolab 2.10. But, in this new server with Autolab 2.12, the same email settings are not working.
We test the email function after disabling SELinux and Firewall, but the internal error continues.
In the Autolab logs this message is displayed:
`autolab | App 191 output: W, [2024-06-30T15:29:56.977753 #191] WARN -- : An error occurred when sending a notification using 'email' notifier.Errno::ECONNREFUSED: Connection refused - connect(2) for "localhost" port 25
autolab | App 191 output: /usr/local/rvm/gems/ruby-3.2.2/gems/net-smtp-0.4.0/lib/net/smtp.rb:631:in `initialize'
autolab | App 191 output: /usr/local/rvm/gems/ruby-3.2.2/gems/net-smtp-0.4.0/lib/net/smtp.rb:631:in `open'
autolab | App 191 output: /usr/local/rvm/gems/ruby-3.2.2/gems/net-smtp-0.4.0/lib/net/smtp.rb:631:in `tcp_socket'
autolab | App 191 output: /usr/local/rvm/gems/ruby-3.2.2/gems/net-smtp-0.4.0/lib/net/smtp.rb:641:in `block in do_start'
autolab | App 191 output: /usr/local/rvm/gems/ruby-3.2.2/gems/timeout-0.4.1/lib/timeout.rb:186:in `block in timeout'
autolab | App 191 output: /usr/local/rvm/gems/ruby-3.2.2/gems/timeout-0.4.1/lib/timeout.rb:193:in `timeout'
autolab | App 191 output: /usr/local/rvm/gems/ruby-3.2.2/gems/net-smtp-0.4.0/lib/net/smtp.rb:640:in `do_start'
autolab | App 191 output: /usr/local/rvm/gems/ruby-3.2.2/gems/net-smtp-0.4.0/lib/net/smtp.rb:610:in `start'
autolab | App 191 output: /usr/local/rvm/gems/ruby-3.2.2/gems/mail-2.8.1/lib/mail/network/delivery_methods/smtp.rb:109:in `start_smtp_session'
autolab | App 191 output: /usr/local/rvm/gems/ruby-3.2.2/gems/mail-2.8.1/lib/mail/network/delivery_methods/smtp.rb:100:in
deliver!' ...
It seems the Autolab is trying to use localhost:25 instead of smtp.gmail.com:587 to send email, but the correct email settings are configured in .env file.
Expected behavior
Autolab sends a email.
The text was updated successfully, but these errors were encountered: