NutzCN Logo
问答 使用RedisService注入来操作redis,运行一段时间就会报错
发布于 1669天前 作者 qq_41c55c4d 2237 次浏览 复制 上一个帖子 下一个帖子
标签:

redis.clients.jedis.exceptions.JedisConnectionException: java.net.SocketException: Connection reset by peer: socket writ
e error
at redis.clients.jedis.Connection.flush(Connection.java:291)
at redis.clients.jedis.Connection.getIntegerReply(Connection.java:220)
at redis.clients.jedis.Jedis.llen(Jedis.java:845)
at org.nutz.integration.jedis.RedisService.llen(RedisService.java:1553)
at org.nutz.integration.jedis.RedisService$$NUTZAOP._aop_invoke(RedisService.java:438)
at org.nutz.aop.InterceptorChain.invoke(InterceptorChain.java:77)
at org.nutz.aop.InterceptorChain.doChain(InterceptorChain.java:57)
at org.nutz.integration.jedis.RedisInterceptor.filter(RedisInterceptor.java:24)
at org.nutz.aop.InterceptorChain.doChain(InterceptorChain.java:60)
at org.nutz.integration.jedis.RedisService$$NUTZAOP.llen(RedisService.java:1)
at com.xyt.base.BaseRestFulApi$8.run(BaseRestFulApi.java:2426)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.net.SocketException: Connection reset by peer: socket write error
at java.net.SocketOutputStream.socketWrite0(Native Method)
at java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:109)
at java.net.SocketOutputStream.write(SocketOutputStream.java:153)
at redis.clients.util.RedisOutputStream.flushBuffer(RedisOutputStream.java:52)
at redis.clients.util.RedisOutputStream.flush(RedisOutputStream.java:213)
at redis.clients.jedis.Connection.flush(Connection.java:288)
... 11 more
redis.clients.jedis.exceptions.JedisConnectionException: java.net.SocketException: Connection reset by peer: socket writ
e error
at redis.clients.jedis.Connection.flush(Connection.java:291)
at redis.clients.jedis.Connection.getIntegerReply(Connection.java:220)
at redis.clients.jedis.Jedis.llen(Jedis.java:845)
at org.nutz.integration.jedis.RedisService.llen(RedisService.java:1553)
at org.nutz.integration.jedis.RedisService$$NUTZAOP._aop_invoke(RedisService.java:438)
at org.nutz.aop.InterceptorChain.invoke(InterceptorChain.java:77)
at org.nutz.aop.InterceptorChain.doChain(InterceptorChain.java:57)
at org.nutz.integration.jedis.RedisInterceptor.filter(RedisInterceptor.java:24)
at org.nutz.aop.InterceptorChain.doChain(InterceptorChain.java:60)
at org.nutz.integration.jedis.RedisService$$NUTZAOP.llen(RedisService.java:1)
at com.xyt.base.BaseRestFulApi$8.run(BaseRestFulApi.java:2426)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.net.SocketException: Connection reset by peer: socket write error
at java.net.SocketOutputStream.socketWrite0(Native Method)
at java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:109)
at java.net.SocketOutputStream.write(SocketOutputStream.java:153)
at redis.clients.util.RedisOutputStream.flushBuffer(RedisOutputStream.java:52)
at redis.clients.util.RedisOutputStream.flush(RedisOutputStream.java:213)
at redis.clients.jedis.Connection.flush(Connection.java:288)
... 11 more
redis.clients.jedis.exceptions.JedisConnectionException: java.net.SocketException: Connection reset by peer: socket writ
e error
at redis.clients.jedis.Connection.flush(Connection.java:291)
at redis.clients.jedis.Connection.getIntegerReply(Connection.java:220)
at redis.clients.jedis.Jedis.llen(Jedis.java:845)
at org.nutz.integration.jedis.RedisService.llen(RedisService.java:1553)
at org.nutz.integration.jedis.RedisService$$NUTZAOP._aop_invoke(RedisService.java:438)
at org.nutz.aop.InterceptorChain.invoke(InterceptorChain.java:77)
at org.nutz.aop.InterceptorChain.doChain(InterceptorChain.java:57)
at org.nutz.integration.jedis.RedisInterceptor.filter(RedisInterceptor.java:24)
at org.nutz.aop.InterceptorChain.doChain(InterceptorChain.java:60)
at org.nutz.integration.jedis.RedisService$$NUTZAOP.llen(RedisService.java:1)
at com.xyt.base.BaseRestFulApi$8.run(BaseRestFulApi.java:2426)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.net.SocketException: Connection reset by peer: socket write error
at java.net.SocketOutputStream.socketWrite0(Native Method)
at java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:109)
at java.net.SocketOutputStream.write(SocketOutputStream.java:153)
at redis.clients.util.RedisOutputStream.flushBuffer(RedisOutputStream.java:52)
at redis.clients.util.RedisOutputStream.flush(RedisOutputStream.java:213)
at redis.clients.jedis.Connection.flush(Connection.java:288)
... 11 more
redis.clients.jedis.exceptions.JedisConnectionException: java.net.SocketException: Connection reset by peer: socket writ
e error
at redis.clients.jedis.Connection.flush(Connection.java:291)
at redis.clients.jedis.Connection.getIntegerReply(Connection.java:220)
at redis.clients.jedis.Jedis.llen(Jedis.java:845)
at org.nutz.integration.jedis.RedisService.llen(RedisService.java:1553)
at org.nutz.integration.jedis.RedisService$$NUTZAOP._aop_invoke(RedisService.java:438)
at org.nutz.aop.InterceptorChain.invoke(InterceptorChain.java:77)
at org.nutz.aop.InterceptorChain.doChain(InterceptorChain.java:57)
at org.nutz.integration.jedis.RedisInterceptor.filter(RedisInterceptor.java:24)
at org.nutz.aop.InterceptorChain.doChain(InterceptorChain.java:60)
at org.nutz.integration.jedis.RedisService$$NUTZAOP.llen(RedisService.java:1)
at com.xyt.base.BaseRestFulApi$8.run(BaseRestFulApi.java:2426)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.net.SocketException: Connection reset by peer: socket write error
at java.net.SocketOutputStream.socketWrite0(Native Method)
at java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:109)
at java.net.SocketOutputStream.write(SocketOutputStream.java:153)
at redis.clients.util.RedisOutputStream.flushBuffer(RedisOutputStream.java:52)
at redis.clients.util.RedisOutputStream.flush(RedisOutputStream.java:213)
at redis.clients.jedis.Connection.flush(Connection.java:288)
... 11 more
redis.clients.jedis.exceptions.JedisConnectionException: java.net.SocketException: Connection reset by peer: socket writ
e error
at redis.clients.jedis.Connection.flush(Connection.java:291)
at redis.clients.jedis.Connection.getIntegerReply(Connection.java:220)
at redis.clients.jedis.Jedis.llen(Jedis.java:845)
at org.nutz.integration.jedis.RedisService.llen(RedisService.java:1553)
at org.nutz.integration.jedis.RedisService$$NUTZAOP._aop_invoke(RedisService.java:438)
at org.nutz.aop.InterceptorChain.invoke(InterceptorChain.java:77)
at org.nutz.aop.InterceptorChain.doChain(InterceptorChain.java:57)
at org.nutz.integration.jedis.RedisInterceptor.filter(RedisInterceptor.java:24)
at org.nutz.aop.InterceptorChain.doChain(InterceptorChain.java:60)
at org.nutz.integration.jedis.RedisService$$NUTZAOP.llen(RedisService.java:1)
at com.xyt.base.BaseRestFulApi$8.run(BaseRestFulApi.java:2426)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.net.SocketException: Connection reset by peer: socket write error
at java.net.SocketOutputStream.socketWrite0(Native Method)
at java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:109)
at java.net.SocketOutputStream.write(SocketOutputStream.java:153)
at redis.clients.util.RedisOutputStream.flushBuffer(RedisOutputStream.java:52)
at redis.clients.util.RedisOutputStream.flush(RedisOutputStream.java:213)
at redis.clients.jedis.Connection.flush(Connection.java:288)
... 11 more
redis.clients.jedis.exceptions.JedisConnectionException: java.net.SocketException: Connection reset by peer: socket writ
e error
at redis.clients.jedis.Connection.flush(Connection.java:291)
at redis.clients.jedis.Connection.getIntegerReply(Connection.java:220)
at redis.clients.jedis.Jedis.llen(Jedis.java:845)
at org.nutz.integration.jedis.RedisService.llen(RedisService.java:1553)
at org.nutz.integration.jedis.RedisService$$NUTZAOP._aop_invoke(RedisService.java:438)
at org.nutz.aop.InterceptorChain.invoke(InterceptorChain.java:77)
at org.nutz.aop.InterceptorChain.doChain(InterceptorChain.java:57)
at org.nutz.integration.jedis.RedisInterceptor.filter(RedisInterceptor.java:24)
at org.nutz.aop.InterceptorChain.doChain(InterceptorChain.java:60)
at org.nutz.integration.jedis.RedisService$$NUTZAOP.llen(RedisService.java:1)
at com.xyt.base.BaseRestFulApi$8.run(BaseRestFulApi.java:2426)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.net.SocketException: Connection reset by peer: socket write error
at java.net.SocketOutputStream.socketWrite0(Native Method)
at java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:109)
at java.net.SocketOutputStream.write(SocketOutputStream.java:153)
at redis.clients.util.RedisOutputStream.flushBuffer(RedisOutputStream.java:52)
at redis.clients.util.RedisOutputStream.flush(RedisOutputStream.java:213)
at redis.clients.jedis.Connection.flush(Connection.java:288)
... 11 more
redis.clients.jedis.exceptions.JedisConnectionException: Could not get a resource from the pool
at redis.clients.util.Pool.getResource(Pool.java:53)
at redis.clients.jedis.JedisPool.getResource(JedisPool.java:99)
at redis.clients.jedis.JedisPool.getResource(JedisPool.java:12)
at org.nutz.integration.jedis.JedisAgent.jedis(JedisAgent.java:49)
at org.nutz.integration.jedis.RedisInterceptor.filter(RedisInterceptor.java:22)
at org.nutz.aop.InterceptorChain.doChain(InterceptorChain.java:60)
at org.nutz.integration.jedis.RedisService$$NUTZAOP.llen(RedisService.java:1)
at com.xyt.base.BaseRestFulApi$8.run(BaseRestFulApi.java:2426)
at java.lang.Thread.run(Thread.java:745)
Caused by: redis.clients.jedis.exceptions.JedisConnectionException: java.net.SocketTimeoutException: connect timed out
at redis.clients.jedis.Connection.connect(Connection.java:164)
at redis.clients.jedis.BinaryClient.connect(BinaryClient.java:80)
at redis.clients.jedis.BinaryJedis.connect(BinaryJedis.java:1677)
at redis.clients.jedis.JedisFactory.makeObject(JedisFactory.java:87)
at org.apache.commons.pool2.impl.GenericObjectPool.create(GenericObjectPool.java:819)
at org.apache.commons.pool2.impl.GenericObjectPool.borrowObject(GenericObjectPool.java:429)
at org.apache.commons.pool2.impl.GenericObjectPool.borrowObject(GenericObjectPool.java:360)
at redis.clients.util.Pool.getResource(Pool.java:49)
... 8 more
Caused by: java.net.SocketTimeoutException: connect timed out
at java.net.DualStackPlainSocketImpl.waitForConnect(Native Method)
at java.net.DualStackPlainSocketImpl.socketConnect(DualStackPlainSocketImpl.java:85)
at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:350)
at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206)
at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188)
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:172)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
at java.net.Socket.connect(Socket.java:589)
at redis.clients.jedis.Connection.connect(Connection.java:158)
... 15 more
redis.clients.jedis.exceptions.JedisConnectionException: Could not get a resource from the pool
at redis.clients.util.Pool.getResource(Pool.java:53)
at redis.clients.jedis.JedisPool.getResource(JedisPool.java:99)
at redis.clients.jedis.JedisPool.getResource(JedisPool.java:12)
at org.nutz.integration.jedis.JedisAgent.jedis(JedisAgent.java:49)
at org.nutz.integration.jedis.RedisInterceptor.filter(RedisInterceptor.java:22)
at org.nutz.aop.InterceptorChain.doChain(InterceptorChain.java:60)
at org.nutz.integration.jedis.RedisService$$NUTZAOP.llen(RedisService.java:1)
at com.xyt.base.BaseRestFulApi$8.run(BaseRestFulApi.java:2426)
at java.lang.Thread.run(Thread.java:745)
Caused by: redis.clients.jedis.exceptions.JedisConnectionException: java.net.SocketTimeoutException: connect timed out
at redis.clients.jedis.Connection.connect(Connection.java:164)
at redis.clients.jedis.BinaryClient.connect(BinaryClient.java:80)
at redis.clients.jedis.BinaryJedis.connect(BinaryJedis.java:1677)
at redis.clients.jedis.JedisFactory.makeObject(JedisFactory.java:87)
at org.apache.commons.pool2.impl.GenericObjectPool.create(GenericObjectPool.java:819)
at org.apache.commons.pool2.impl.GenericObjectPool.borrowObject(GenericObjectPool.java:429)
at org.apache.commons.pool2.impl.GenericObjectPool.borrowObject(GenericObjectPool.java:360)
at redis.clients.util.Pool.getResource(Pool.java:49)
... 8 more
Caused by: java.net.SocketTimeoutException: connect timed out
at java.net.DualStackPlainSocketImpl.waitForConnect(Native Method)
at java.net.DualStackPlainSocketImpl.socketConnect(DualStackPlainSocketImpl.java:85)
at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:350)
at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206)
at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188)
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:172)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
at java.net.Socket.connect(Socket.java:589)
at redis.clients.jedis.Connection.connect(Connection.java:158)
... 15 more
redis.clients.jedis.exceptions.JedisConnectionException: Could not get a resource from the pool
at redis.clients.util.Pool.getResource(Pool.java:53)
at redis.clients.jedis.JedisPool.getResource(JedisPool.java:99)
at redis.clients.jedis.JedisPool.getResource(JedisPool.java:12)
at org.nutz.integration.jedis.JedisAgent.jedis(JedisAgent.java:49)
at org.nutz.integration.jedis.RedisInterceptor.filter(RedisInterceptor.java:22)
at org.nutz.aop.InterceptorChain.doChain(InterceptorChain.java:60)
at org.nutz.integration.jedis.RedisService$$NUTZAOP.llen(RedisService.java:1)
at com.xyt.base.BaseRestFulApi$8.run(BaseRestFulApi.java:2426)
at java.lang.Thread.run(Thread.java:745)
Caused by: redis.clients.jedis.exceptions.JedisConnectionException: java.net.SocketTimeoutException: connect timed out
at redis.clients.jedis.Connection.connect(Connection.java:164)
at redis.clients.jedis.BinaryClient.connect(BinaryClient.java:80)
at redis.clients.jedis.BinaryJedis.connect(BinaryJedis.java:1677)
at redis.clients.jedis.JedisFactory.makeObject(JedisFactory.java:87)
at org.apache.commons.pool2.impl.GenericObjectPool.create(GenericObjectPool.java:819)
at org.apache.commons.pool2.impl.GenericObjectPool.borrowObject(GenericObjectPool.java:429)
at org.apache.commons.pool2.impl.GenericObjectPool.borrowObject(GenericObjectPool.java:360)
at redis.clients.util.Pool.getResource(Pool.java:49)
... 8 more
Caused by: java.net.SocketTimeoutException: connect timed out
at java.net.DualStackPlainSocketImpl.waitForConnect(Native Method)
at java.net.DualStackPlainSocketImpl.socketConnect(DualStackPlainSocketImpl.java:85)
at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:350)
at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206)
at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188)
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:172)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
at java.net.Socket.connect(Socket.java:589)
at redis.clients.jedis.Connection.connect(Connection.java:158)
... 15 more
redis.clients.jedis.exceptions.JedisConnectionException: Could not get a resource from the pool
at redis.clients.util.Pool.getResource(Pool.java:53)
at redis.clients.jedis.JedisPool.getResource(JedisPool.java:99)
at redis.clients.jedis.JedisPool.getResource(JedisPool.java:12)
at org.nutz.integration.jedis.JedisAgent.jedis(JedisAgent.java:49)
at org.nutz.integration.jedis.RedisInterceptor.filter(RedisInterceptor.java:22)
at org.nutz.aop.InterceptorChain.doChain(InterceptorChain.java:60)
at org.nutz.integration.jedis.RedisService$$NUTZAOP.llen(RedisService.java:1)
at com.xyt.base.BaseRestFulApi$8.run(BaseRestFulApi.java:2426)
at java.lang.Thread.run(Thread.java:745)
Caused by: redis.clients.jedis.exceptions.JedisConnectionException: java.net.SocketTimeoutException: connect timed out
at redis.clients.jedis.Connection.connect(Connection.java:164)
at redis.clients.jedis.BinaryClient.connect(BinaryClient.java:80)
at redis.clients.jedis.BinaryJedis.connect(BinaryJedis.java:1677)
at redis.clients.jedis.JedisFactory.makeObject(JedisFactory.java:87)
at org.apache.commons.pool2.impl.GenericObjectPool.create(GenericObjectPool.java:819)
at org.apache.commons.pool2.impl.GenericObjectPool.borrowObject(GenericObjectPool.java:429)
at org.apache.commons.pool2.impl.GenericObjectPool.borrowObject(GenericObjectPool.java:360)
at redis.clients.util.Pool.getResource(Pool.java:49)

1 回复

网络不稳?

添加回复
请先登陆
回到顶部