xxl-job调度执行器的端口被外部频繁访问造成的错误

xxl-job调度执行器的端口被外部频繁访问造成的错误如下:

[2020-05-16 16:52:54.996][ERROR][][nioEventLoopGroup-5-5][c.x.j.c.server.EmbedServer$EmbedHttpServerHandler] - >>>>>>>>>>> xxl-job provider netty_http server caught exception
java.io.IOException: Connection reset by peer
	at sun.nio.ch.FileDispatcherImpl.read0(Native Method)
	at sun.nio.ch.SocketDispatcher.read(SocketDispatcher.java:39)
	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.PooledUnsafeDirectByteBuf.setBytes(PooledUnsafeDirectByteBuf.java:288)
	at io.netty.buffer.AbstractByteBuf.writeBytes(AbstractByteBuf.java:1132)
	at io.netty.channel.socket.nio.NioSocketChannel.doReadBytes(NioSocketChannel.java:347)
	at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:148)
	at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:648)
	at io.netty.channel.nio.NioEventLoop.processSelectedKeysPlain(NioEventLoop.java:548)
	at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:502)
	at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:462)
	at io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:897)
	at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
	at java.lang.Thread.run(Thread.java:748)

虽然该错误提示并不影响定时任务的调度执行.但是这个日志是端口每被外部访问一次就会报一次错误.会打印很多很多日志.


 

最后在xxl-job的github问题中发现徐雪力老师回答到该错误是因为执行器设置的端口也就是9999可能被爬虫或者外部项目频繁访问造成的错误.

然后想到我们项目是设置了阿里云的负载均衡的健康检查的.针对9999端口做了检查.每隔两秒中就会检查访问一次.

 

这是个坑....去掉负载均衡的健康检查就没有事儿了

 

 

 

 

你可能感兴趣的:(定时调度)