-
Notifications
You must be signed in to change notification settings - Fork 1.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
Redis client cannot connect to Redis Server due to TLS cert error #2347
Comments
if the URL protocol is "rediss" (with double s) it'll use TLS |
@leibale : whether I use |
I'm confused.. wanna debug it together? I'll be here for the next 15 minutes |
@younes-io did you manage to solve it? |
@leibale Not really, I just switched to the older version of the package :/ |
I started with the Heroku docs on connecting with TLS in Node. They propose the following approach:
Which led to the error: It took me too long to consider that Heroku would have a non-working / dated pattern on their help but eventually looked at the node-redis config page
I didn't open a ticket for Heroku to update their docs because I'm not sure that approach couldn't/shouldn't work in some context other than my own. If anyone can shed some light on how even the self-signed cert seems to be optional I'd be interested to learn how that's handled on Heroku. node version: 18.15.0 |
@builder173 thanks for the heads-up, I'll ask Heroku to update their documentation :) edit: |
Thanks for reaching out to Heroku. I'll try to add some structure to the self-signed cert question. I'm basically trying to figure out why my connection worked without specifying the cert: '...' property that appears in the node-redis examples. Looking through to the tls.connect() docs, perhaps this is only needed when server verifies the client certificate in 2-way ssl? (and apparently Heroku redis doesn't?)
|
@builder173 because you have |
So then can/should the cert: '...' property be removed from the last example in the node-redis config page? If I understand what you're saying, you wouldn't specify that property together with rejectUnauthorized: false. |
Please share if there is any solution for this issue. |
adding |
I have this bit of code:
process.env.REDIS_URL
has a value of this format :rediss://$USERNAME:$PASSWORD@$HOST:$PORT/0
I get this error when I run it:
I don't understand why do I have this error even though I'm not using any certificate at all...
Environment:
The text was updated successfully, but these errors were encountered: