老师,今天做netty 客户端调用服务端。客户端抛出了这么一个异常,搞了一下午也没有解决,求教老师。
16:54:37.978 spring-boot-logging [http-nio-18081-exec-2] WARN io.netty.channel.AbstractChannel - Force-closing a channel whose registration task was not accepted by an event loop: [id: 0xa6e31f29]
java.util.concurrent.RejectedExecutionException: event executor terminated
at io.netty.util.concurrent.SingleThreadEventExecutor.reject(SingleThreadEventExecutor.java:987)
at io.netty.util.concurrent.SingleThreadEventExecutor.offerTask(SingleThreadEventExecutor.java:388)
at io.netty.util.concurrent.SingleThreadEventExecutor.addTask(SingleThreadEventExecutor.java:381)
at io.netty.util.concurrent.SingleThreadEventExecutor.execute(SingleThreadEventExecutor.java:886)
at io.netty.channel.AbstractChannel$AbstractUnsafe.register(AbstractChannel.java:472)
at io.netty.channel.SingleThreadEventLoop.register(SingleThreadEventLoop.java:87)
at io.netty.channel.SingleThreadEventLoop.register(SingleThreadEventLoop.java:81)
at io.netty.channel.MultithreadEventLoopGroup.register(MultithreadEventLoopGroup.java:86)
at io.netty.bootstrap.AbstractBootstrap.initAndRegister(AbstractBootstrap.java:311)
at io.netty.bootstrap.Bootstrap.doResolveAndConnect(Bootstrap.java:157)
at io.netty.bootstrap.Bootstrap.connect(Bootstrap.java:118)
这个情况是,我把服务重启一下。第一次调用没问题,第二次调用就会出这个错误。
出这个错误,是因为传输的xml 数据中有图片,数据量较大。就会出现这个问题。
同样的netty客户端,调用另外一个接口,传输的数据不携带图片。就不会出现这个错误。
求教老师解答,谢谢啦