如果一直wait…
[root@localhost myredis]# systemctl start firewalld
[root@localhost myredis]# firewall-cmd --state
running
[root@localhost myredis]# firewall-cmd --zone=public --add-port=16379/tcp --permanent
success
[root@localhost myredis]# systemctl restart firewalld
[root@localhost myredis]# firewall-cmd --zone=public --list-ports
22/tcp 6379/tcp 16379/tcp
[root@localhost myredis]# systemctl stop firewalld
[root@localhost myredis]# systemctl disable firewalld
[root@localhost myredis]# firewall-cmd --state
not running
Warning: Using a password with ‘-a’ or ‘-u’ option on the command line interface may not be safe.
[ERR] Node 192.168.85.122:6385 is not empty. Either the node already knows other nodes (check with CLUSTER NODES) or contains some key in database 0.
解决办法:
[root@localhost cluster]# ll
total 24
-rw-r–r-- 1 root root 1391 Jun 20 18:27 cluster6383.log
-rw-r–r-- 1 root root 1426 Jun 20 18:27 cluster6384.log
-rw-r–r-- 1 root root 1074 Jun 20 18:27 nodes-6383.conf
-rw-r–r-- 1 root root 1074 Jun 20 18:27 nodes-6384.conf
-rw-r–r-- 1 root root 343 Jun 20 17:52 redisCluster6383.conf
-rw-r–r-- 1 root root 343 Jun 20 17:52 redisCluster6384.conf
[root@localhost cluster]# rm -rf .log
[root@localhost cluster]# ll
total 16
-rw-r–r-- 1 root root 1074 Jun 20 18:27 nodes-6383.conf
-rw-r–r-- 1 root root 1074 Jun 20 18:27 nodes-6384.conf
-rw-r–r-- 1 root root 343 Jun 20 17:52 redisCluster6383.conf
-rw-r–r-- 1 root root 343 Jun 20 17:52 redisCluster6384.conf
[root@localhost cluster]# rm -rf node
[root@localhost cluster]# ll
total 8
-rw-r–r-- 1 root root 343 Jun 20 17:52 redisCluster6383.conf
-rw-r–r-- 1 root root 343 Jun 20 17:52 redisCluster6384.conf
[root@localhost cluster]# ps -ef|grep redis
root 13371 1 0 18:06 ? 00:00:12 redis-server 0.0.0.0:6383 [cluster]
root 13377 1 0 18:06 ? 00:00:12 redis-server 0.0.0.0:6384 [cluster]
root 16657 13283 0 20:48 pts/1 00:00:00 grep --color=auto redis
[root@localhost cluster]# kill -9 13371
[root@localhost cluster]# kill -9 13377
[root@localhost cluster]# ps -ef|grep redis
root 16667 13283 0 20:49 pts/1 00:00:00 grep --color=auto redis
[root@localhost cluster]# redis-server /myredis/cluster/redisCluster6383.conf
[root@localhost cluster]# redis-server /myredis/cluster/redisCluster6384.conf