当前位置:网站首页>Linux,Redis中IOException: 远程主机强迫关闭了一个现有的连接。解决方法

Linux,Redis中IOException: 远程主机强迫关闭了一个现有的连接。解决方法

2022-08-11 07:57:00 秋9

【现象】

[ERROR] Exception occured. Channel: [id: 0x60dbc204, L:/192.168.0.107:64658 - R:104.115.158.104/104.115.158.104:6379] - 2022-08-09 22:25:28,352 [redisson-netty-2-7] org.redisson.client.handler.CommandsQueue(exceptionCaught,153) 
java.io.IOException: 远程主机强迫关闭了一个现有的连接。
	at sun.nio.ch.SocketDispatcher.read0(Native Method) ~[na:1.8.0_181]
	at sun.nio.ch.SocketDispatcher.read(SocketDispatcher.java:43) ~[na:1.8.0_181]
	at sun.nio.ch.IOUtil.readIntoNativeBuffer(IOUtil.java:223) ~[na:1.8.0_181]
	at sun.nio.ch.IOUtil.read(IOUtil.java:192) ~[na:1.8.0_181]
	at sun.nio.ch.SocketChannelImpl.read(SocketChannelImpl.java:380) ~[na:1.8.0_181]
	at io.netty.buffer.PooledByteBuf.setBytes(PooledByteBuf.java:247) ~[netty-buffer-4.1.38.Final.jar:4.1.38.Final]
	at io.netty.buffer.AbstractByteBuf.writeBytes(AbstractByteBuf.java:1140) ~[netty-buffer-4.1.38.Final.jar:4.1.38.Final]
	

【解决方法】

tcp-keepalive 300

修改为:

tcp-keepalive 0

原网站

版权声明
本文为[秋9]所创,转载请带上原文链接,感谢
https://onefire.blog.csdn.net/article/details/126257398