Redis TLS

How do I get a TLS url for Redis through railway? IORedis refuses to connect with a normal redis:// url on prod (I'm getting the ERR Connect issue), which is what it by default generates (as far as I can tell, there is no TLS version)
27 Replies
Percy
Percy13mo ago
Project ID: 702d396a-95bd-40d9-aefb-6919279b0e94
quinnvaughn
quinnvaughnOP13mo ago
702d396a-95bd-40d9-aefb-6919279b0e94
quinnvaughn
quinnvaughnOP13mo ago
This is definitely due to tls issues with the code.
No description
quinnvaughn
quinnvaughnOP13mo ago
Which it works fine on Heroku (I'm attempting at using Railway instead) with a rediss:// url so that's the main issue.
No description
Brody
Brody13mo ago
the redis databases railway provides do not have tls
quinnvaughn
quinnvaughnOP13mo ago
So I just have to use a third party one?
Brody
Brody13mo ago
or turn off the tls requirement?
quinnvaughn
quinnvaughnOP13mo ago
Making it undefined or {} seems to have the same issue Not sure how to turn it off
Brody
Brody13mo ago
can you connect to the database locally?
quinnvaughn
quinnvaughnOP13mo ago
You mean can I connect to the prod redis on Railway on my localhost?
Brody
Brody13mo ago
yes
quinnvaughn
quinnvaughnOP13mo ago
Like that code works fine with just my local computer redis I will check Ok it seems to work But I've tried setting tls to undefined and got the same connection error on prod
Brody
Brody13mo ago
can you try to add a 3 second sleep to your start command?
quinnvaughn
quinnvaughnOP13mo ago
You mean my yarn start? How would I? Isn't that what something like connectTimeout is for on the settings?
Brody
Brody13mo ago
sleep 3 && yarn start
quinnvaughn
quinnvaughnOP13mo ago
No description
Brody
Brody13mo ago
^
quinnvaughn
quinnvaughnOP13mo ago
Right but I'm saying isn't that the point of that setting?
Brody
Brody13mo ago
nope
quinnvaughn
quinnvaughnOP13mo ago
You want me to push the sleep code to prod to test this?
Brody
Brody13mo ago
it doesnt involve a code change?
quinnvaughn
quinnvaughnOP13mo ago
Oh I mean it works on localhost Without the sleep
quinnvaughn
quinnvaughnOP13mo ago
This, correct?
No description
quinnvaughn
quinnvaughnOP13mo ago
If so, same issue
quinnvaughn
quinnvaughnOP13mo ago
No description
quinnvaughn
quinnvaughnOP13mo ago
Which I got this same issue on Heroku because it wasn't a rediss url on the base plan and upgrading it did work with no other code changes. Ok I feel like an idiot The reason I needed this on heroku is because it was a TLS url and it wouldn't work without that code. If I remove the TLS code it actually does just work.
Want results from more Discord servers?
Add your server