-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Email_backend not configured despite environment variable being set #7436
Comments
Hello, Why did you think, that it is configurable via docker compose? And you will need to rebuild docker images after that. |
Thanks a TON buddy, I'm a GREEEEN hand about Docker so I guess something I have tried might be wrong cauz still not very proficient with its usage. Following your advice, I attempted to add the Email_Backend configuration to the
and then rebuilt the containers. However, I encountered the same issue and have not been able to successfully configure the email backend. |
What command did you use to rebuild images? |
I added my settings to |
I had exactly the same problem last days. It was fixed after editing your email settings into base.py and rebuilding cvat image with this command: |
I hope the suggestion helped you. |
I am running into the same issue. After trying the above command you shared I get the following error.
Before running this command I am able to connect to the database properly without any problem, but as soon as I update it with the above command and restart the docker I start seeing this error. |
Is the issue fixed? I configured email configuration in file After inviting a user, got the error hint of "xxx. Email backend is not configured.", but it was solved when I moved configuration item It's not clear what the |
Hello, What will be the clear steps to do that ? |
First let those users to register/sign up on the CVAT Once the do that you (owner of CVAT) can add them in the organization by typing their email address and inviting them |
Thanks for answering Yes i did that but i am facing this error
|
bump. could someone please explain exactly how to set up the email backend? i've tried all the suggestions mentioned here to no avail. also, does this work with gmail? |
There had an example in cvat\tests\docker-compose.email.yml , copy these lines into your yml , and config cvat\settings\email_settings.py |
Fixed this issue by configured email_settings.py like : Email backend settings for DjangoEMAIL_BACKEND = 'django.core.mail.backends.console.EmailBackend' then use this command restart docker: you can send your mail successfully, while don't forget finish some server side settings such as let the port pass through ... |
@idako2023, after this change I don't see the error anymore. I get a notification message "Invitation was sent successfully". However, emails are not getting delivered. Do we need to re-build the relevant docker images? How do I see the relevant logs in this case? Thanks in advance. |
I tried all settings from this ticket. Howver, from the logs, I still see the default values such as example.com webmaster@localhost being used. Am I missing something here?
|
Actions before raising this issue
Steps to Reproduce
0: Deploy CVAT step by step under the guidence of official Docs, with Docker and on Ubuntu;
1: Modify docker-compose.yml, like this:
2: Create an orgnization and invite a guy, try sending an email.
3: Fail to send and get “Email backend is not configured.”
I have confirmed that the environment variable is set correctly inside the Docker container by using the command
printenv | grep EMAIL_BACKEND
, which returns the expected output:EMAIL_BACKEND=django.core.mail.backends.console.EmailBackend
.However, when I inspect the logs (by using
docker logs cvat_server
) after a failed email attempt, I see the following error message:[2024-02-04 18:08:10,859] ERROR django.request: Internal Server Error: /api/invitations/3SGAVXioLEGqTkPZBTyuWi4TkESbJlzTkSWnsSe1MhRDpEyTAzpOXHl4OHUrLnkh/resend
I have tried restarting the CVAT service and the Docker container, but the issue persists. I have also checked the cvat/settings/base.py file inside the container, and it appears that the EMAIL_BACKEND is set to None, which I believe is the default value and should be overridden by the environment variable.
I am using the Docker deployment method and have ensured that all dependencies are installed according to the official CVAT documentation. I have not made any custom modifications to the CVAT codebase.
Expected Behavior
Just send invitation email successfully.
Possible Solution
Tried modifing base.py/email_settings.py/docker-compose.yml (simply adding my email config to it/them), but nothing changed.
Context
No response
Environment
git log -1 commit b7cc5627daa04958ed045e4b3fe9fd68ec3c9e01 (HEAD -> develop, origin/develop, origin/HEAD) Author: Boris Sekachev <boris.sekachev@yandex.ru> Date: Fri Feb 2 00:03:11 2024 +0200 lsb_release -a No LSB modules are available. Distributor ID: Ubuntu Description: Ubuntu 20.04.6 LTS Release: 20.04 Codename: focal docker version Client: Docker Engine - Community Version: 25.0.2 API version: 1.44 Go version: go1.21.6 Git commit: 29cf629 Built: Thu Feb 1 00:23:19 2024 OS/Arch: linux/amd64 Context: default Server: Docker Engine - Community Engine: Version: 25.0.2 API version: 1.44 (minimum version 1.24) Go version: go1.21.6 Git commit: fce6e0c Built: Thu Feb 1 00:23:19 2024 OS/Arch: linux/amd64 Experimental: false containerd: Version: 1.6.28 GitCommit: ae07eda36dd25f8a1b98dfbf587313b99c0190bb runc: Version: 1.1.12 GitCommit: v1.1.12-0-g51d5e94 docker-init: Version: 0.19.0 GitCommit: de40ad0
The text was updated successfully, but these errors were encountered: