Failed to send password reset email successfully

Hi,
I am unable to reset password from my login screen.I get error - “Failed to send password reset email successfully”

I have hosted this on Google Cloud and SMTP is configured properly.
SMTP - “Test Connection” gives message - No errors were reported while sending an email. Please check your inbox to make sure.But i have not received any email.

All users get the same error.

Hello, @sysadmintf

Since you mentioned that you are unable to have the password reset email successfully, can you please check the Site URL under System Console > Environment > Web Server?

Click on the Test Live URL button and let me know the result. Additionally, please check the mattermost.log when the password reset was attempted to verify if we have any related log entries that help us understand the issue better. Thanks.

Hi @ahmaddanial

Thank you for the reply.

I tried - Test Live URL and got this error.
Test unsuccessful: This is not a valid live URL

Hi, @sysadmintf

You are welcome and thanks for the update. Since you mentioned that the test failed, that could be the reason behind it.

  • Can you please let me if the server you deployed Mattermost on is connected to the internet?
  • Is your Mattermost instance public facing? If yes, can you please share the URL so I can test it on my end too?
  • May I know if you have checked the mattermost.log when the password reset attempt was made? Can you share what was the log entry at that point of time? For example, you can run the following command on the terminal of the Mattermost Server:
tail -f /opt/mattermost/logs/mattermost.log

Hi, @ahmaddanial

  • Can you please let me if the server you deployed Mattermost on is connected to the internet?

Yes it is connected to internet

  • Is your Mattermost instance public facing? If yes, can you please share the URL so I can test it on my end too?

Yes it is public facing and the IP is - https://34.106.151.214

  • May I know if you have checked the mattermost.log when the password reset attempt was made? Can you share what was the log entry at that point of time? For example, you can run the following command on the terminal of the Mattermost Server:

Below is the mattermost.log

sysadmin@mattermost-test-vm:~/apps/mattermost/server/logs$ tail -f mattermost.log
{“level”:“info”,“ts”:1586429077.4648254,“caller”:“jobs/workers.go:68”,“msg”:“Starting workers”}
{“level”:“info”,“ts”:1586429077.4743807,“caller”:“app/web_hub.go:75”,“msg”:“Starting websocket hubs”,“number_of_hubs”:2}
{“level”:“info”,“ts”:1586429077.480449,“caller”:“jobs/schedulers.go:74”,“msg”:“Starting schedulers.”}
{“level”:“info”,“ts”:1586429077.4931855,“caller”:“app/server.go:470”,“msg”:“Starting Server…”}
{“level”:“info”,“ts”:1586429077.493393,“caller”:“app/server.go:538”,“msg”:“Server is listening on 127.0.0.1:8065”,“address”:“127.0.0.1:8065”}
{“level”:“error”,“ts”:1586429159.1119258,“caller”:“mlog/log.go:175”,“msg”:“This is not a valid live URL”,“path”:“/api/v4/site_url/test”,“request_id”:“477bj9uktidh38rfru39w1g9zr”,“ip_addr”:"
106.206.85.142",“user_id”:“k7ecz6zuhbrh3e9xkz9kjp4puw”,“method”:“POST”,“err_where”:“testSiteURL”,“http_code”:400,“err_details”:“”}
{“level”:“error”,“ts”:1586500665.3564112,“caller”:“mlog/log.go:175”,“msg”:“Failed to send password reset email successfully”,“path”:“/api/v4/users/password/reset/send”,“request_id”:“47wjfxw
1i3ftjbqeoancsa48gy”,“ip_addr”:“223.186.179.90”,“user_id”:“”,“method”:“POST”,“err_where”:“SendPasswordReset”,“http_code”:500,“err_details”:“err=Failed to open TLS connection”}
{“level”:“error”,“ts”:1586500670.7036915,“caller”:“mlog/log.go:175”,“msg”:“Failed to send password reset email successfully”,“path”:“/api/v4/users/password/reset/send”,“request_id”:“bf3i3mm
mw386txp9taw335heje”,“ip_addr”:“223.186.179.90”,“user_id”:“”,“method”:“POST”,“err_where”:“SendPasswordReset”,“http_code”:500,“err_details”:“err=Failed to open TLS connection”}
{“level”:“error”,“ts”:1586500710.2576828,“caller”:“mlog/log.go:175”,“msg”:“Failed to send password reset email successfully”,“path”:“/api/v4/users/password/reset/send”,“request_id”:“7a3gncw
5e7b4imi7kr7mczqenc”,“ip_addr”:“223.186.179.90”,“user_id”:“”,“method”:“POST”,“err_where”:“SendPasswordReset”,“http_code”:500,“err_details”:“err=Failed to open TLS connection”}
{“level”:“error”,“ts”:1586500714.0534997,“caller”:“mlog/log.go:175”,“msg”:“Failed to send password reset email successfully”,“path”:“/api/v4/users/password/reset/send”,“request_id”:“qibjsuh
jwtnt8xahfzyz1b1abr”,“ip_addr”:“223.186.179.90”,“user_id”:“”,“method”:“POST”,“err_where”:“SendPasswordReset”,“http_code”:500,“err_details”:“err=Failed to open TLS connection”}

Hi, @sysadmintf

Based on the error that we see in the log, the SendPasswordReset command is complaining about the failure to open TLS connection. While I can reach out to your instance via 443:

Ahmad-Danials-MacBook-Pro:~ ahmaddanialmohammad$ echo | telnet 34.106.151.214 443
Trying 34.106.151.214...
Connected to 214.151.106.34.bc.googleusercontent.com.
Escape character is '^]'.
Connection closed by foreign host.

Can the Mattermost instance reach out to the email server you configured? You can run a ping and telnet test to see if it can talk to each other:

echo | telnet <mail_server> <ip_address>

Can you please share the settings of your instance with the sensitive information redacted such as password so I understand the web server and SMTP configuration better?

cat /opt/mattermost/config/config.json | grep -A91 "ServiceSettings"
cat /opt/mattermost/config/config.json | grep -A30 "EmailSettings"

Hi @ahmaddanial ,

I have created another instance of Mattermost for testing.I can share those details.
But I do not want to share anything on this public forum.
Is there any other way??

have you solve this problem? I faced the same error.
Thanks

Hi, @sysadmintf .

Sorry this slipped off my radar completely. Did you end up fixing the issue?

Hello, @ketrue .

Can you confirm if you have configured your SMTP correctly? Did you attempt to tail the mattermost.log and verify if there are any errors related to SMTP when the password reset was attempted?