Redis配置主从时报错“Could not connect to Redis at 192.168.0.50:6379: Connection refused not connected>”


配置Redis主从时,修改完从节点配置文件,然后报错

[root@Rich七哥-0-50 redis]# /opt/redis/redis-cli -h 192.168.0.50
Could not connect to Redis at 192.168.0.50:6379: Connection refused
not connected> quit

这是因为需要重新加载配置文件

执行

redis-server /etc/redis.conf 

1430:C 30 Oct 2019 09:46:45.118 # oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo
1430:C 30 Oct 2019 09:46:45.118 # Redis version=5.0.4, bits=64, commit=00000000, modified=0, pid=1430, just started
1430:C 30 Oct 2019 09:46:45.118 # Configuration loaded


然后从新连接时,恢复正常


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM