解决JedisNoReachableClusterNodeException,No reachable node in cluster报错

通过jedis连接redis集群时报如下的错误:JedisNoReachableClusterNodeException,No reachable node in cluster

解决JedisNoReachableClusterNodeException,No reachable node in cluster报错

本机连接均正常:

解决JedisNoReachableClusterNodeException,No reachable node in cluster报错

 解决方法:

1、删除集群下的所有rdb和nodes文件

rm -rf dump63*.rdb nodes-*.conf

解决JedisNoReachableClusterNodeException,No reachable node in cluster报错

 2、启动节点并重新建立集群

解决JedisNoReachableClusterNodeException,No reachable node in cluster报错

[root@localhost myredis]# cd /opt/redis-6.2.4/src/
[root@localhost src]# redis-cli --cluster create --cluster-replicas 1 192.168.37.8:6379 192.168.37.8:6380 192.168.37.8:6381 192.168.37.8:6389 192.168.37.8:6390 192.168.37.8:6391

解决JedisNoReachableClusterNodeException,No reachable node in cluster报错

 解决JedisNoReachableClusterNodeException,No reachable node in cluster报错

 3、再次连接jedis,连接成功。

解决JedisNoReachableClusterNodeException,No reachable node in cluster报错

 4、如还发现报错的情况,考虑防火墙是否关闭:

systemctl stop firewalld.service

解决JedisNoReachableClusterNodeException,No reachable node in cluster报错

 

解决JedisNoReachableClusterNodeException,No reachable node in cluster报错

上一篇:python3 邮件,多用户,抄送


下一篇:Ubuntu安装Navicat 12 for MySQL