配置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
然后從新連接時,恢復正常