gpt4 book ai didi

redis - 与 redis 的连接超时

转载 作者:IT王子 更新时间:2023-10-29 05:57:48 25 4
gpt4 key购买 nike

<分区>

$ redis-cli -h ec2-75-101-204-XXX.compute-1.amazonaws.com
Could not connect to Redis at ec2-75-101-204-XXX.compute-1.amazonaws.com:6379: Operation timed out

这就是我从我的主机上得到的。我在那台机器上设置了安全组以打开端口 6379。

当我在 redis 服务器上运行 netstat 时,我看到它正在监听:

$ netstat -nlp
(No info could be read for "-p": geteuid()=1000 but you should be root.)
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 127.0.0.1:6379 0.0.0.0:* LISTEN -
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN -
tcp6 0 0 :::22 :::* LISTEN -
udp 0 0 0.0.0.0:68 0.0.0.0:* -
Active UNIX domain sockets (only servers)

我的 redis.conf 看起来像:

daemonize yes
pidfile /var/run/redis.pid
port 6379
timeout 300
loglevel notice
logfile /var/log/redis.log
databases 16

save 900 1
save 300 10
save 60 10000

stop-writes-on-bgsave-error yes
rdbcompression yes

那么为什么我会在另一台机器上超时?

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