xuxueli / xxl-job

A distributed task scheduling framework.(分布式任务调度平台XXL-JOB)
http://www.xuxueli.com/xxl-job/
GNU General Public License v3.0
27.62k stars 10.93k forks source link

Too many open files #1066

Closed yuweiming2016 closed 5 years ago

yuweiming2016 commented 5 years ago

Please answer some questions before submitting your issue. Thanks!

Which version of XXL-JOB do you using?

2.0.2

今天发现admin怎么都执行不起来,打开admin日志一看: com.xxl.rpc.util.XxlRpcException: java.lang.IllegalStateException: failed to create a child event loop at com.xxl.rpc.remoting.invoker.reference.XxlRpcReferenceBean$1.invoke(XxlRpcReferenceBean.java:227) at com.sun.proxy.$Proxy129.run(Unknown Source) at com.xxl.job.admin.core.trigger.XxlJobTrigger.runExecutor(XxlJobTrigger.java:196) at com.xxl.job.admin.core.trigger.XxlJobTrigger.processTrigger(XxlJobTrigger.java:149) at com.xxl.job.admin.core.trigger.XxlJobTrigger.trigger(XxlJobTrigger.java:74) at com.xxl.job.admin.core.thread.JobTriggerPoolHelper$3.run(JobTriggerPoolHelper.java:77) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang.Thread.run(Thread.java:748) Caused by: java.lang.IllegalStateException: failed to create a child event loop at io.netty.util.concurrent.MultithreadEventExecutorGroup.(MultithreadEventExecutorGroup.java:88) at io.netty.util.concurrent.MultithreadEventExecutorGroup.(MultithreadEventExecutorGroup.java:58) at io.netty.channel.MultithreadEventLoopGroup.(MultithreadEventLoopGroup.java:52) at io.netty.channel.nio.NioEventLoopGroup.(NioEventLoopGroup.java:87) at io.netty.channel.nio.NioEventLoopGroup.(NioEventLoopGroup.java:82) at io.netty.channel.nio.NioEventLoopGroup.(NioEventLoopGroup.java:63) at io.netty.channel.nio.NioEventLoopGroup.(NioEventLoopGroup.java:51) at io.netty.channel.nio.NioEventLoopGroup.(NioEventLoopGroup.java:43) at com.xxl.rpc.remoting.net.impl.netty_http.client.NettyHttpConnectClient.init(NettyHttpConnectClient.java:48) at com.xxl.rpc.remoting.net.common.ConnectClient.getPool(ConnectClient.java:110) at com.xxl.rpc.remoting.net.common.ConnectClient.asyncSend(ConnectClient.java:41) at com.xxl.rpc.remoting.net.impl.netty_http.client.NettyHttpClient.asyncSend(NettyHttpClient.java:18) at com.xxl.rpc.remoting.invoker.reference.XxlRpcReferenceBean$1.invoke(XxlRpcReferenceBean.java:216) ... 8 common frames omitted Caused by: io.netty.channel.ChannelException: failed to open a new selector at io.netty.channel.nio.NioEventLoop.openSelector(NioEventLoop.java:169) at io.netty.channel.nio.NioEventLoop.(NioEventLoop.java:143) at io.netty.channel.nio.NioEventLoopGroup.newChild(NioEventLoopGroup.java:127) at io.netty.channel.nio.NioEventLoopGroup.newChild(NioEventLoopGroup.java:36) at io.netty.util.concurrent.MultithreadEventExecutorGroup.(MultithreadEventExecutorGroup.java:84) ... 20 common frames omitted Caused by: java.io.IOException: Too many open files at sun.nio.ch.IOUtil.makePipe(Native Method) at sun.nio.ch.EPollSelectorImpl.(EPollSelectorImpl.java:65) at sun.nio.ch.EPollSelectorProvider.openSelector(EPollSelectorProvider.java:36) at io.netty.channel.nio.NioEventLoop.openSelector(NioEventLoop.java:167) ... 24 common frames omitted

请问是什么原因造成此类问题?我才2个job,按道理不会因为太多导致文件句柄数量持有太多,应该是某个地方没释放资源?

xuxueli commented 5 years ago

你好,这个升级xxl-rpc到 1.4.1,或者升级 XXL-JOB到最新版本可以解决。低版本的一个小概率问题。

yuweiming2016 commented 5 years ago

好的,我等你的2.1.1版本上了我就升级

LiZhenye commented 4 years ago

有提供升级脚本吗?2.1.1相对于2.0.2表结构发生了变更,请问旧任务如何迁移?