1. (error) CLUSTERDOWN Hash slot not served:
问题经过:
之前集群搭建好之后,因为一些操作将 nodes-7005.conf 类似的文件删除,以 redis-cli -c -h 192.168.75.130 -p 7005 连接集群,使用 cluster nodes,发现集群只有一个7005节点。 使用set age 100 赋值命令就出现上述错误。连接其他几个节点都是如此
解决:
重新创建集群,将所有节点重新分配一次主从即可。
redis-cli --cluster create 192.168.75.130:7001 192.168.75.130:7002 192.168.75.130:7003 192.168.75.130:7004 192.168.75.130:7005 192.168.75.130:7006 --cluster-replicas 1
2. sentinel directive while not in sentinel mode
问题详情:
*** FATAL CONFIG FILE ERROR ***
Reading the configuration file, at line 84
>>> 'sentinel monitor mymaster 192.168.75.130 8001 1'
sentinel directive while not in sentinel mode
解决:
redis-server sentinel.conf --sentinel