错误报告
、 2023-06-24 23:02:53.631 [lettuce-nioEventLoop-4-1] INFO i.l.core.protocol.CommandHandler - null Unexpected exception during request: java.io.IOException: 远程主机强迫关闭了一个现有的连接。 java.io.IOException: 远程主机强迫关闭了一个现有的连接。 at sun.nio.ch.SocketDispatcher.read0(Native Method) at sun.nio.ch.SocketDispatcher.read(SocketDispatcher.java:43) at sun.nio.ch.IOUtil.readIntoNativeBuffer(IOUtil.java:223) at sun.nio.ch.IOUtil.read(IOUtil.java:192) at sun.nio.ch.SocketChannelImpl.read(SocketChannelImpl.java:380) at io.netty.buffer.PooledByteBuf.setBytes(PooledByteBuf.java:253) at io.netty.buffer.AbstractByteBuf.writeBytes(AbstractByteBuf.java:1134) at io.netty.channel.socket.nio.NioSocketChannel.doReadBytes(NioSocketChannel.java:350) at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:151) at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:719) at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:655) at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:581) at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:493) at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:989) at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74) at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30) at java.lang.Thread.run(Thread.java:748) 2023-06-24 23:02:56.340 [com.alibaba.nacos.naming.beat.sender] INFO com.alibaba.nacos.client.naming - [REGISTER-SERVICE] public registering service DEFAULT_GROUP@@leadnews-wemedia with instance: Instance{instanceId='null', ip='192.168.0.100', port=51803, weight=1.0, healthy=true, enabled=true, ephemeral=true, clusterName='DEFAULT', serviceName='DEFAULT_GROUP@@leadnews-wemedia', metadata={preserved.register.source=SPRING_CLOUD}} 2023-06-24 23:02:59.391 [lettuce-eventExecutorLoop-1-3] INFO i.l.core.protocol.ConnectionWatchdog - Reconnecting, last destination was /139.159.138.73:6379 2023-06-24 23:03:01.409 [lettuce-nioEventLoop-4-2] INFO i.l.c.protocol.ReconnectionHandler - Reconnected to 139.159.138.73:6379
解决策略
看到最后几行6379就知道和redis有关了,可以把超时时间调久一点,就能成功访问了
redis: timeout: 60s