redis.clients.jedis.exceptions.JedisNoReachableClusterNodeException: No reachable node in cluster

Redis集群应用报错:
redis.clients.jedis.exceptions.JedisNoReachableClusterNodeException: No reachable node in cluster
具体异常信息如下:
redis.clients.jedis.exceptions.JedisNoReachableClusterNodeException: No reachable node in cluster
 at redis.clients.jedis.JedisSlotBasedConnectionHandler.getConnection(JedisSlotBasedConnectionHandler.java:61)
 at redis.clients.jedis.JedisSlotBasedConnectionHandler.getConnectionFromSlot(JedisSlotBasedConnectionHandler.java:78)
 at redis.clients.jedis.JedisClusterCommand.runWithRetries(JedisClusterCommand.java:113)
 at redis.clients.jedis.JedisClusterCommand.run(JedisClusterCommand.java:30)
 at redis.clients.jedis.JedisCluster.del(JedisCluster.java:1216)
 at com.jt.controller.UserController.logout(UserController.java:98)
 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
 at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
 at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
 at java.lang.reflect.Method.invoke(Method.java:498)
 at org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:190)
 at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:138)
 at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:104)
 at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:892)
 at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:797)
 at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:87)
 at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:1039)
 at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:942)
 at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:1005)
 at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServle
异常:Redis集群的node(节点)连接失败;
造成原因:<1>检查Redis是否正常启动(如图正常)
Linux命令:ps -ef | grep redis

在这里插入图片描述

<2>检查防火墙是否关闭(Linux与windows均需要关闭);
命令:Centos 6/6.4/6.5   
永久关闭防火墙: chkconfig iptables off
永久打开防火墙: chkconfig iptables on
临时关闭防火墙:service iptables stop
临时打开防火墙:service iptables start
查看防火墙状态:service iptables status
命令:Centos 7及以上   
启动: systemctl start firewalld.service  (.service可以省略)
关闭: systemctl stop firewalld.service
查看状态: systemctl status firewalld.service
开机禁用 : systemctl disable firewalld.service
开机启用 : systemctl enable firewalld.service
<2>Redis集群的node节点IP异常(本文便是由此错误造成)

我的Linux系统IP:
在这里插入图片描述
源文件配置节点信息:
在这里插入图片描述
改正为:
在这里插入图片描述

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值