背景:
Redis 5.0 在A主机(172.16.18.33)配置好并启动,在B主机(172.16.18.32)用Redis-cli -h 172.16.18.33 连接 报错
Could not connect to Redis at 172.16.18.33:6379: Connection refused
原因:
配置文件redis.conf 中
bind 127.0.0.1 无法连接到目标机器
解决:
将bind 后面IP设置为本机真实IP( bing 172.16.18.33),重启服务就可以连上了。