INFO | jvm 1 | 2017/03/09 19:45:10 | java.util.concurrent.RejectedExecutionException: event executor terminated INFO | jvm 1 | 2017/03/09 19:45:10 | at io.netty.util.concurrent.SingleThreadEventExecutor.reject(SingleThreadEventExecutor.java:805) INFO | jvm 1 | 2017/03/09 19:45:10 | at io.netty.util.concurrent.SingleThreadEventExecutor.offerTask(SingleThreadEventExecutor.java:345) INFO | jvm 1 | 2017/03/09 19:45:10 | at io.netty.util.concurrent.SingleThreadEventExecutor.addTask(SingleThreadEventExecutor.java:338) INFO | jvm 1 | 2017/03/09 19:45:10 | at io.netty.util.concurrent.SingleThreadEventExecutor.execute(SingleThreadEventExecutor.java:745) INFO | jvm 1 | 2017/03/09 19:45:10 | at io.netty.channel.AbstractChannel$AbstractUnsafe.invokeLater(AbstractChannel.java:877) INFO | jvm 1 | 2017/03/09 19:45:10 | at io.netty.channel.AbstractChannel$AbstractUnsafe.deregister(AbstractChannel.java:682) INFO | jvm 1 | 2017/03/09 19:45:10 | at io.netty.channel.AbstractChannel$AbstractUnsafe.fireChannelInactiveAndDeregister(AbstractChannel.java:642) INFO | jvm 1 | 2017/03/09 19:45:10 | at io.netty.channel.AbstractChannel$AbstractUnsafe.close(AbstractChannel.java:625) INFO | jvm 1 | 2017/03/09 19:45:10 | at io.netty.channel.AbstractChannel$AbstractUnsafe.close(AbstractChannel.java:554) INFO | jvm 1 | 2017/03/09 19:45:10 | at io.netty.channel.DefaultChannelPipeline$HeadContext.close(DefaultChannelPipeline.java:1236) INFO | jvm 1 | 2017/03/09 19:45:10 | at io.netty.channel.AbstractChannelHandlerContext.invokeClose(AbstractChannelHandlerContext.java:629) INFO | jvm 1 | 2017/03/09 19:45:10 | at io.netty.channel.AbstractChannelHandlerContext.close(AbstractChannelHandlerContext.java:613) INFO | jvm 1 | 2017/03/09 19:45:10 | at io.netty.channel.ChannelOutboundHandlerAdapter.close(ChannelOutboundHandlerAdapter.java:71) INFO | jvm 1 | 2017/03/09 19:45:10 | at io.netty.channel.AbstractChannelHandlerContext.invokeClose(AbstractChannelHandlerContext.java:629) INFO | jvm 1 | 2017/03/09 19:45:10 | at io.netty.channel.AbstractChannelHandlerContext.close(AbstractChannelHandlerContext.java:613) INFO | jvm 1 | 2017/03/09 19:45:10 | at io.netty.channel.ChannelOutboundHandlerAdapter.close(ChannelOutboundHandlerAdapter.java:71) INFO | jvm 1 | 2017/03/09 19:45:10 | at io.netty.channel.AbstractChannelHandlerContext.invokeClose(AbstractChannelHandlerContext.java:629) INFO | jvm 1 | 2017/03/09 19:45:10 | at io.netty.channel.AbstractChannelHandlerContext.close(AbstractChannelHandlerContext.java:613) INFO | jvm 1 | 2017/03/09 19:45:10 | at io.netty.channel.AbstractChannelHandlerContext.close(AbstractChannelHandlerContext.java:470) INFO | jvm 1 | 2017/03/09 19:45:10 | at io.netty.channel.DefaultChannelPipeline.close(DefaultChannelPipeline.java:949) INFO | jvm 1 | 2017/03/09 19:45:10 | at io.netty.channel.AbstractChannel.close(AbstractChannel.java:194) INFO | jvm 1 | 2017/03/09 19:45:10 | at io.netty.channel.ChannelFutureListener$2.operationComplete(ChannelFutureListener.java:56) INFO | jvm 1 | 2017/03/09 19:45:10 | at io.netty.channel.ChannelFutureListener$2.operationComplete(ChannelFutureListener.java:52) INFO | jvm 1 | 2017/03/09 19:45:10 | at io.netty.util.concurrent.DefaultPromise.notifyListener0(DefaultPromise.java:514) INFO | jvm 1 | 2017/03/09 19:45:10 | at io.netty.util.concurrent.DefaultPromise.notifyListeners0(DefaultPromise.java:507) INFO | jvm 1 | 2017/03/09 19:45:10 | at io.netty.util.concurrent.DefaultPromise.notifyListenersNow(DefaultPromise.java:486) INFO | jvm 1 | 2017/03/09 19:45:10 | at io.netty.util.concurrent.DefaultPromise.notifyListeners(DefaultPromise.java:427) INFO | jvm 1 | 2017/03/09 19:45:10 | at io.netty.util.concurrent.DefaultPromise.tryFailure(DefaultPromise.java:129) INFO | jvm 1 | 2017/03/09 19:45:10 | at io.netty.channel.epoll.AbstractEpollStreamChannel$EpollStreamUnsafe.fulfillConnectPromise(AbstractEpollStreamChannel.java:821) INFO | jvm 1 | 2017/03/09 19:45:10 | at io.netty.channel.epoll.AbstractEpollStreamChannel$EpollStreamUnsafe.finishConnect(AbstractEpollStreamChannel.java:840)
经仔细分析,是因为在创建socket失败的时候,shutdown了所属的EventLoopGroup所致,调整为shutdownGracefully(),问题即解决。