antirez / redis-rb-cluster

Redis Cluster Ruby client based on redis-rb
248 stars 106 forks source link

use sshtunnel. dont conn redis cluster #16

Open haidong5210 opened 3 years ago

haidong5210 commented 3 years ago

from sshtunnel import SSHTunnelForwarder import rediscluster

REDIS_HOST = 'xxxxxx' tunnel = SSHTunnelForwarder(('127.0.0.1', 22), ssh_username='ubuntu', remote_bind_address=(REDIS_HOST, 6379)) tunnel.start()

startup_nodes = [ {"host": '127.0.0.1', "port": tunnel.local_bind_port} ]

split_redis_con = rediscluster.RedisCluster( startup_nodes=startup_nodes, decode_responses=True, skip_full_coverage_check=True )

use sshtunnel. dont conn redis cluster

gh549427987 commented 2 years ago

me too, and now can you find the solution?