-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
ConnectionError [SSL: CERTIFICATE_VERIFY_FAILED] when connecting to AWS ElastiCache over TLS #1080
Comments
@dkms-its You can use redis-py 3.x and create a client instance with the |
Thanks for the quick reply and workaround, @andymccurdy. However, we're using redis.py not directly but through django-redis, so i guess i have to ask them for a corresponding option. |
Hi @dkms-its, are you by chance using a cname to connect? This would cause the cert to not match the host name. AWS doesn't support custom ssl certs for Elasticache at this time, so you'll need to use the actually target's name (ie master.**********.cache.amazonaws.com). I'd recommend you submit another request to AWS support to add support requesting the ability to use ACM / IAM certs in elacticache (I have already). |
Had the same issue when accessing azure redis ( using Azure end point , not a CNAME ) . |
Im having this issue with an Azure Redis Cache. Traceback (most recent call last): Just updated from 2.10.6 to 3.0.0. The constructor I'm using is the following. |
@rwsanders Looks like you didn't load the CA certs, see the comment just above yours. 😉 |
Not sure what this means in terms of using Azure PaaS Redis and Azure PaaS WebApp (where Python is running) where the implementation is bootstrapped with SSL out of the box. I'm not sure if the CA certs are made available to me. Is there something I'm missing? |
Aha! It looks like I need to create a separate app service certificate using the Azure App Service Certificate service. Thanks for the help. |
I am experiencing the same issue as the two above posts. I am sorry to repeat the question here but I can't decipher the solution. Can you please provide some details?
and I get the error:
I get the error while issuing the set() command and not in creating the redis object. |
@Alessandro-QDT You need to either
or
|
I had the same error with Azure Redis Cache on Windows and on MacOS and solved it by adding ssl_cert_reqs=u'none' as mentioned by @andymccurdy.
|
It seems like redis-py is behaving correctly. Closing this issue as there are ways to load the correct certs with both Azure and AWS. |
I still think that the problem is that by default the |
Is there a known cert bundle for the elasticache service like how the rds service has it? How is the line truly encrypted in transit if we cannot validate the CA? |
We're experiencing connection issues with v3.x when trying to use our AWS managed ElastiCache Redis Cluster (version 4.0.10) over TLS (rediss://...). Rolling back to 2.10 fixes the issue immediately.
This is the stacktrace of our application:
ConnectionError: Error 1 connecting to master.**********.cache.amazonaws.com:6379. [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1051).
(8 additional frame(s) were not displayed)
...
File "redis/client.py", line 1182, in exists
return self.execute_command('EXISTS', *names)
File "redis/client.py", line 760, in execute_command
connection.send_command(*args)
File "redis/connection.py", line 619, in send_command
self.send_packed_command(self.pack_command(*args))
File "redis/connection.py", line 594, in send_packed_command
self.connect()
File "redis/connection.py", line 498, in connect
raise ConnectionError(self._error_message(e))
The text was updated successfully, but these errors were encountered: