gpt4 book ai didi

amazon-web-services - 无法访问 AWS 中的 Redis 服务器

转载 作者:可可西里 更新时间:2023-11-01 11:46:16 28 4
gpt4 key购买 nike

我在 AWS 中设置了我的 Redis 服务器,但我无法从外部 IP 连接到它,尽管我可以从同一服务器内访问它。

我还做了以下事情:

  1. 向实例的安全组添加了入站规则以允许访问所有流量(以测试)。
  2. 检查绑定(bind)属性是否在reds.config文件中被注释

我仍然无法使用它访问它redis-cli -h xxx.xxx.xxx.xx -p 6379

请帮忙

更新:

我可以 telnet 到端口,所以 Redis 本身一定有什么东西不允许访问?

网络统计结果:

[ec2-user@ip-10-10-102-0 ~]$ netstat -a | egrep 'Proto|LISTEN'Proto Recv-Q Send-Q Local Address Foreign Address State
tcp 0 0 *:ssh : 收听
tcp 0 0 localhost:smtp : 收听
tcp 0 0 *:6379 :
tcp 0 0 *:ssh : 收听

最佳答案

您是否尝试在 redis.conf 中设置要绑定(bind)的 IP?例如:

# bind 192.168.1.100 10.0.0.1
# bind 127.0.0.1

关于amazon-web-services - 无法访问 AWS 中的 Redis 服务器,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30611082/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com