Open haidong5210 opened 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
me too, and now can you find the solution?
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