Problem
On my Ruby on Rails app, I keep getting the error below for the Heroku Redis Premium 0 add-on:
OpenSSL::SSL::SSLError: SSL_connect returned=1 errno=0 state=error: certificate verify failed (self signed certificate in certificate chain)
Heroku Redis documentation mentions that I need to enable TLS in my Redis client's configuration in order to connect to a Redis 6 database. To achive this, I have read SSL/TLS Support documentation on redis-rb. My understanding from it is; I need to assign ca_file
, cert
and key
for Redis.new#ssl_params
. The question is how to set these for Redis or through Sidekiq on Heroku?
Updates
Update 3: Heroku support provided an answer which solved the problem.
Update 2: Created Heroku support ticket and waiting response.
Update 1: Asked on Sidekiq's Github issues and was adviced go write Heroku support. Will update this question, when I do get an answer.
Related Info
I have verified the app does work when the add-on is either one of the below:
- hobby-dev for Redis 6
- premium 0 for Redis 5
Versions:
- Ruby – 3.0.0p0
- Ruby on Rails – 6.1.1
- Redis – 6.0
- redis-rb – 4.2.5
- Sidekiq – 6.2.1
- Heroku Stack – 20
Some links that helped me to narrow down the issue:
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…