Quantcast
Channel: Active questions tagged redis+ruby-on-rails - Stack Overflow
Viewing all articles
Browse latest Browse all 873

I am getting a "SSL_connect wrong version number (OpenSSL::SSL::SSLError)" when trying to connect to elasticache endpoint from rails app

$
0
0

I have a redis cluster in elasticache which is has cluster mode enabled. I follow the steps to test the connection that are explained here https://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/GettingStarted.ConnectToCacheNode.html and the connection between my ec2 instance and the redis cluster is working fine. The problem comes when I try to connect a user to a channel of the rails app. When the connection is being created this exception is raised

#<Thread:0x0000ffff7152d840 /usr/local/bundle/gems/actioncable-7.0.7/lib/action_cable/subscription_adapter/redis.rb:160 run> terminated with exception (report_on_exception is true):/usr/local/bundle/gems/redis-4.8.1/lib/redis/connection/ruby.rb:264:in `connect_nonblock': SSL_connect returned=1 errno=0 peeraddr=172.31.6.145:6379 state=error: wrong version number (OpenSSL::SSL::SSLError)

this is what I have in my config/cable

development:  adapter: redis  ssl: true  url: <%= ENV.fetch("REDIS_URL") %>  channel_prefix: my_app_backend_development

in my .env I have

REDIS_URL=rediss://my-app-staging-web-sockets-cluster.lvng.clustercfg.use2.cache.amazonaws.com:6379 this are the version of the gems that I have

gem list | grep openssl# openssl (default: 3.1.0)gem list | grep redis# redis (4.8.1)

when I run

openssl version# OpenSSL 3.0.9 30 May 2023 (Library: OpenSSL 3.0.9 30 May 2023)

in the elasticache service I am using the redis 7.0.7 version and the type of the nodes is cache.t2.micro

I have tried updating the openssl gem and the redis gem, but that didn't work


Viewing all articles
Browse latest Browse all 873

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>