connect timed out

浪子不回头ぞ 提交于 2019-12-06 08:09:28

redis.clients.jedis.exceptions.JedisConnectionException: java.net.SocketTimeoutException: connect timed out
at redis.clients.jedis.Connection.connect(Connection.java:207)
at redis.clients.jedis.BinaryClient.connect(BinaryClient.java:93)
at redis.clients.jedis.Connection.sendCommand(Connection.java:126)
at redis.clients.jedis.BinaryClient.set(BinaryClient.java:110)
at redis.clients.jedis.Client.set(Client.java:47)
at redis.clients.jedis.Jedis.set(Jedis.java:120)
at redis.clients.jedis.ShardedJedis.set(ShardedJedis.java:43)
at com.snsoft.base.service.impl.JedisClientSrv$1.execute(JedisClientSrv.java:53)
at com.snsoft.base.service.impl.JedisClientSrv$1.execute(JedisClientSrv.java:51)
at com.snsoft.base.service.impl.JedisClientSrv.execute(JedisClientSrv.java:31)
at com.snsoft.base.service.impl.JedisClientSrv.set(JedisClientSrv.java:51)
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:483)
at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:338)
at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:197)

 

1.如果是本地启动时:

报错原因:主要看这剧redis.clients.jedis.exceptions.JedisConnectionException: java.net.SocketTimeoutException: connect timed out

中的connect timed out提示链接超时

解决办法:没有打开redis,打开redis就i可以

 

2.不是本地启动:

出现这个错误连接不上linux的redis,一般就是防火墙问题

转载地址:https://blog.csdn.net/ksdb0468473/article/details/52126474

 

 

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!