-
-
Notifications
You must be signed in to change notification settings - Fork 176
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-Redis SSL Issues #493
Comments
This code works for me: # create job queue
redis_settings = RedisSettings.from_dsn(settings.REDIS_URL)
redis_settings.ssl_cert_reqs = "none" |
Thank you - my issue stemmed from the RedisSettings object initialization and modification. Previously, I attempted to set Won't work: from arq.connections import RedisSettings, create_pool
async def example():
redis_settings = RedisSettings(ssl_cert_reqs = "none").from_dsn(config.REDIS_URL)
return await create_pool(redis_settings) In the following working version, the RedisSettings class is initialized with the from arq.connections import RedisSettings, create_pool
async def example():
redis_settings = RedisSettings.from_dsn(config.REDIS_URL)
redis_settings.ssl_cert_reqs = "none"
return await create_pool(redis_settings) Not sure if this is worth mentioning in the docs or if it makes sense to enhance the conf = urlparse(dsn)
query_params = parse_qs(conf.query)
# Extract SSL settings from query parameters with a fallback to defaults
ssl_cert_reqs = query_params.get('ssl_cert_reqs', ['required'])[0] |
No problem! I agree that the constructor should accept and pass on the kwargs. However considering there's an entire rewrite in progress I guess it's not super high priority right now! |
Thanks for reporting.
In some senses, now is a good time to fix this - if we merge a fix and more importantly tests, we'll have to support that behavior after the rewrite. |
The following
redis.ConnectionPool.from_url(config.REDIS_URL)
works with Heroku's REDIS_URL, but due to their TLS changes, I was unable to connect usingcreate_pool(RedisSettings().from_dsn(config.REDIS_URL))
which led to the following SSLCertVerificationError error:No matter how I pass in
ssl=True
to the RedisSettings class and setssl_cert_reqs=none
, I get ConnectionErrors, whereas withredis.asyncio
, I can establish the pool/client.While digging around the ARQ code, I saw that the ArqRedis class allows you to pass a pool directly to the
pool_or_conn=pool
parameter, which works as a workaround for me.The text was updated successfully, but these errors were encountered: