Comments (15)
I tested the following:
docker run --rm -it \
--name=ls-healthchecks \
-e DB_NAME=/tmp/hc.sqlite \
-e [email protected] \
-e EMAIL_HOST=smtp.gmail.com \
-e EMAIL_PORT=587 \
-e [email protected] \
-e EMAIL_HOST_PASSWORD=FIXME-VALID-PASSWORD \
-e EMAIL_USE_TLS=True \
-p 8000:8000 \
lscr.io/linuxserver/healthchecks:latest
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:
[pid: 177|app: 0|req: 3/3] 172.17.0.1 () {48 vars in 849 bytes} [Mon Jun 19 13:55:42 2023] POST /accounts/signup/ => generated 54 bytes in 390 msecs (HTTP/1.1 200) 8 headers in 331 bytes (1 switches on core 0)
Exception in thread Thread-1:
Traceback (most recent call last):
File "/usr/lib/python3.11/threading.py", line 1038, in _bootstrap_inner
self.run()
File "/app/healthchecks/hc/lib/emails.py", line 25, in run
self.message.send()
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
raise SMTPAuthenticationError(code, resp)
smtplib.SMTPAuthenticationError: (535, b'5.7.8 Username and Password not accepted. Learn more at\n5.7.8 https://support.google.com/mail/?p=BadCredentials g24-20020a2e9cd8000000b002ad988efd73sm2510020ljj.14 - gsmtp')
from healthchecks.
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.
from healthchecks.
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
from healthchecks.
@samcro1967, @rangitoto72 can you try the command that I used, swap in your username and password, leave everything else as-is?
docker run --rm -it \
--name=ls-healthchecks \
-e DB_NAME=/tmp/hc.sqlite \
-e [email protected] \
-e EMAIL_HOST=smtp.gmail.com \
-e EMAIL_PORT=587 \
-e [email protected] \
-e EMAIL_HOST_PASSWORD=FIXME-VALID-PASSWORD \
-e EMAIL_USE_TLS=True \
-p 8000:8000 \
lscr.io/linuxserver/healthchecks:latest
from healthchecks.
That worked. The only difference is the DB_NAME. Maybe my DB is corrupt somehow?
from healthchecks.
@samcro1967 the other difference is using plain docker vs docker-compose. Perhaps variable substitution in your docker-compose.yml
is not working properly?
from healthchecks.
Ah, also, the Linuxserver image has this REGENERATE_SETTINGS
thing – perhaps the container is using old values?
from healthchecks.
@samcro1967, @rangitoto72 did you figure out what the issue was?
from healthchecks.
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.
from healthchecks.
starting the container with no DB or local setting file
So the way to change email settings is wiping my complete installation ...?
from healthchecks.
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.
from healthchecks.
Thanks for replying!
I think I had understood as much - so again, removed the container, DB and setting files, and recreated the container
means deleting my whole setup, because my checks etc are stored in that DB that needs to be removed?
from healthchecks.
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.
from healthchecks.
@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.py
file if it exists next to the settings.py
file.
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.
from healthchecks.
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.yml
from this repository with the line image: 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.
from healthchecks.
Related Issues (20)
- Scraping all projects in Prometheus
- Expose grace period metrics
- Feature request: dependency between checks for decision on changing health status or sending notifications HOT 2
- Alert on pinging IP address change HOT 2
- Support Systemd OnCalendar timers HOT 8
- Disabling emails causes 500 error when adding new project members HOT 3
- How to transfer project ownership without configuring emails HOT 1
- Configure disabling magic link sign-in HOT 1
- Fallback notifications HOT 2
- Unable to add HTTP_COOKIE due to uwsgi buffer size HOT 4
- Planned Down Time HOT 1
- Migration payments.0009_alter_subscription_user fails on upgrade to v3.1 HOT 2
- README at Docker Hub is outdated HOT 4
- "Data too long for column 'code' at row 1" HOT 10
- Cannot upload a file larger than 2.5 MB HOT 1
- [BUG] Problems with PING_ENDPOINT HOT 3
- Better Stack Incident creation / alerting integration? HOT 2
- Allowing scanning of text in a pdf email attachment
- Prune outdated history HOT 2
- Truncate beginning of long request bodies instead of the end HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from healthchecks.