mirror of
https://github.com/healthchecks/healthchecks.git
synced 2026-04-25 23:15:49 +03:00
[GH-ISSUE #846] SMTP Not working for me in v2.9.2 #592
Labels
No labels
bug
bug
bug
feature
good-first-issue
new integration
pull-request
question
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/healthchecks#592
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @samcro1967 on GitHub (Jun 18, 2023).
Original GitHub issue: https://github.com/healthchecks/healthchecks/issues/846
I do not seem to be able to get SMTP to work in v2.9.2. The same settings work with other applications. There are no error messages in the container logs. I also tried with a local SMTP relay server I have setup and it is not working either. Not sure where to look or what else to try with no error message. Everything in
local_settings.pylooks as it should. I have also checked the SPAM folder.Anyone have any ideas?
docker compose
@cuu508 commented on GitHub (Jun 19, 2023):
I tested the following:
I used the signup form and email arrived.
I then tested the same, but with a deliberately incorrect password. After sending email, I saw an error message in container logs:
@samcro1967 commented on GitHub (Jun 19, 2023):
I am not getting an error message so I don't think it is a bad password issue. I created a new Gmail app password and it never shows up in the Gmail dashboard that the password was used when I try to signup a new user. I can take that same password and set it up in another app. It works and the password then shows as used. Seem like the email never leaves the app and reaches Gmail even though there are no error messages.
@rangitoto72 commented on GitHub (Jun 19, 2023):
I too have the same issue.
Fresh docker install this evening using lscr.io/linuxserver/healthchecks:latest
I created a new Username / Password in ny mail server, i can send emails too and from this account using another application i have by updating to the new credentials.
However when using the credentials with this docker image:
Nothing comes to my inbox.
File "/lsiopy/lib/python3.11/site-packages/django/core/mail/message.py", line 298, in send
return self.get_connection(fail_silently).send_messages([self])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/lsiopy/lib/python3.11/site-packages/django/core/mail/backends/smtp.py", line 127, in send_messages
new_conn_created = self.open()
^^^^^^^^^^^
File "/lsiopy/lib/python3.11/site-packages/django/core/mail/backends/smtp.py", line 94, in open
self.connection.login(self.username, self.password)
File "/usr/lib/python3.11/smtplib.py", line 750, in login
raise last_exception
File "/usr/lib/python3.11/smtplib.py", line 739, in login
(code, resp) = self.auth(
^^^^^^^^^^
File "/usr/lib/python3.11/smtplib.py", line 662, in auth
@cuu508 commented on GitHub (Jun 19, 2023):
@samcro1967, @rangitoto72 can you try the command that I used, swap in your username and password, leave everything else as-is?
@samcro1967 commented on GitHub (Jun 19, 2023):
That worked. The only difference is the DB_NAME. Maybe my DB is corrupt somehow?
@cuu508 commented on GitHub (Jun 20, 2023):
@samcro1967 the other difference is using plain docker vs docker-compose. Perhaps variable substitution in
your docker-compose.ymlis not working properly?@cuu508 commented on GitHub (Jun 20, 2023):
Ah, also, the Linuxserver image has this
REGENERATE_SETTINGSthing – perhaps the container is using old values?@cuu508 commented on GitHub (Jun 22, 2023):
@samcro1967, @rangitoto72 did you figure out what the issue was?
@samcro1967 commented on GitHub (Jun 22, 2023):
Getting the environment variables correct and then starting the container with no DB or local setting file solved it for me. Seems like trying to adjust the variables after the DB and setting files has been created did not work.
@crhbetz commented on GitHub (Jul 25, 2023):
starting the container with no DB or local setting fileSo the way to change email settings is wiping my complete installation ...?
@samcro1967 commented on GitHub (Jul 25, 2023):
I use docker compose and they are set as environment variables in my compose file. So when I removed the DB and local setting file, there were correctly recreated from the environment variables. When the variables were not correct or did not work, I updated them, removed the container, DB and setting files, and recreated the container. Tested and did again until it was working. Hope that helps.
@crhbetz commented on GitHub (Jul 25, 2023):
Thanks for replying!
I think I had understood as much - so again,
removed the container, DB and setting files, and recreated the containermeans deleting my whole setup, because my checks etc are stored in that DB that needs to be removed?@samcro1967 commented on GitHub (Jul 25, 2023):
Ah gotcha ya. I did not start setting up things until I had tested to make sure everything was working. I only setup one check during my testing phase.
I just looked thru the DB with LSIO sqlitebrowser and did not see any obvious signs of the settings being stored there. Did you try to only remove the settings file?
Good luck.
@cuu508 commented on GitHub (Jul 28, 2023):
@crhbetz Healthchecks (the web application that lives in this repository) does not store its configuration in the database, it reads it from environment variables, and also from the
local_settings.pyfile if it exists next to thesettings.pyfile.If you are using the 3rd-party linuxserver docker image, I cannot comment on how it handles settings, or what precautions you need to make when using it in order not to lose your data.
@crhbetz commented on GitHub (Sep 21, 2023):
Thanks for getting back to this. Unfortunately I missed my notification until now ...
I'll refrain from using a ping because I can't provide any more relevant info.
I'm using the
docker/docker-compose.ymlfrom this repository with the lineimage: healthchecks/healthchecks:v2.10_un_commented.After commenting on this issue, I played around a little more because testing with the provided docker run command I had been able to send mails. Eventually, I got it to work, but I'm unable to name a specific thing that finally made it work. It's happily been sending mails ever since.