问题原文
原帖链接 · Farmi · CC BY-SA 3.0
We are using ElastiCache - Redis for our site, we need to flush the Redis cache and when I try to connect to my ElastiCache - Redis remotely by this command from any PC
redis-cli -h example-redis-1.example.0001.euw1.cache.amazonaws.com -p 6379
It always says:
Could not connect to Redis at example-redis-1.example.0001.euw1.cache.amazonaws.com:6379: Connection refused not connected>
I have made sure that inbound rule allows 6379 from any IP and also tried to edit /etc/redis.conf to add bind example-redis-1.example.0001.euw1.cache.amazonaws.com but even than the error remains the same.
社区高分解答
原帖链接 · anuj pradhan · CC BY-SA 3.0
Step 1:
ssh -f -N -L6379:<your redis node endpoint>:6379 <your EC2 node that you use to connect to redis>
Example : ssh -f -N -L6379:redis.aps1.cache.amazonaws.com:6379 [email omitted]
Step 2:
redis-cli -h 127.0.0.1 -p 6379
摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。
