启动前最好把这几个文件删了
清空数据
[ERR] Node 192.168.119.10:7001 is not empty. Either the node already knows other nodes (check with CLUSTER NODES) or contains some key in database 0.
root@lin bin]# ./redis-cli -h 192.168.119.10 -p 7001 192.168.119.10:7001> flushall OK 192.168.119.10:7001> cluster reset OK
(error) READONLY You can’t write against a read only slave.
(error) READONLY You can’t write against a read only slave. 修改redis.conf配置文件中的参数slave-read-only yes 把yes修改为no,重启从服务器,从服务器就具有读写权限。 但是,不应该啊,从节点就是只读啊,可能是我之前启动过一次,把这个设置为了从节点,保留了只读属性,待验证
ps aux | grep redis 设置好了之后,kill,然后重启对应的节点
(error) MOVED 5926 192.168.119.12:7004
启动时没带-c,退出,重新启动客户端,带上-c
|