-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
Heroku - Default Redis connection uses TSLS #5500
Comments
I'm a beginner, but I'm interested in this issue, may i work on this issue? |
I have fixed the problem with this changes in REDIS_URL = env("REDIS_TLS_URL")
...
CELERY_REDIS_BACKEND_USE_SSL = {"ssl_cert_reqs": ssl.CERT_NONE}
CELERY_BROKER_USE_SSL = {"ssl_cert_reqs": ssl.CERT_NONE}
REDIS_SSL = env.bool("REDIS_SSL", default=False)
CELERY_BROKER_CONNECTION_RETRY_ON_STARTUP = True
if REDIS_SSL:
CACHES["default"]["OPTIONS"]["CONNECTION_POOL_CLASS"] = (
"redis.connection.SSLConnection"
)
CACHES["default"]["OPTIONS"]["SSL_CERT_REQS"] = None |
Thanks for the suggestion! I'd like to test and implement these changes. |
``
From what you suggested, I modified it a little for readability and maintenance |
@qwerrrqw Sorry, these settings work partially; they do not work with Redis caches. REDIS_URL = env("REDIS_TLS_URL")
CELERY_REDIS_BACKEND_USE_SSL = {"ssl_cert_reqs": ssl.CERT_NONE}
CELERY_BROKER_USE_SSL = {"ssl_cert_reqs": ssl.CERT_NONE}
CELERY_BROKER_CONNECTION_RETRY_ON_STARTUP = True
# CACHES
# ------------------------------------------------------------------------------
CACHES = {
"default": {
"BACKEND": "django.core.cache.backends.redis.RedisCache",
"LOCATION": REDIS_URL,
"OPTIONS": {"ssl_cert_reqs": None},
},
} |
My Heroku celery scheduled tasks stopped working on October 14th ~ 5am heroku-redis: Update REDIS by heroku-redis Is there any official fix ? |
What happened?
Heroku is now using default TLS connection for Redis. The current settings parameter only supports non-secure connection.
What should've happened instead?
The settings for production Heroku deployment should default to secure TLS connection using rediss://
Additional details
Adding
broker_use_ssl = {
"cert_reqs": ssl.CERT_NONE,
}
still throws
raise ValueError(E_REDIS_SSL_CERT_REQS_MISSING_INVALID)
Host system configuration:
Version of cookiecutter CLI (get it with
cookiecutter --version
):OS name and version:
On Linux, run
On MacOs, run
On Windows, via CMD, run
# Insert here the OS name and version
Python version, run
python3 -V
: 3.11.10Docker version (if using Docker), run
docker --version
: N/Adocker compose version (if using Docker), run
docker compose --version
:...
Options selected and/or replay file:
On Linux and macOS:
cat ${HOME}/.cookiecutter_replay/cookiecutter-django.json
(Please, take care to remove sensitive information)
The text was updated successfully, but these errors were encountered: