xuxueli / xxl-job

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

xxl-job服务端调用client端报Too many open files #1297

Closed laohu588 closed 4 years ago

laohu588 commented 4 years ago

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.$Proxy87.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:76) 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:49) at com.xxl.rpc.remoting.net.common.ConnectClient.getPool(ConnectClient.java:111) 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.EPollArrayWrapper.epollCreate(Native Method) at sun.nio.ch.EPollArrayWrapper.(EPollArrayWrapper.java:130) at sun.nio.ch.EPollSelectorImpl.(EPollSelectorImpl.java:69) at sun.nio.ch.EPollSelectorProvider.openSelector(EPollSelectorProvider.java:36) at io.netty.channel.nio.NioEventLoop.openSelector(NioEventLoop.java:167) ... 24 common frames omitted

laohu588 commented 4 years ago

xxl-rpc的版本是1.4.1的版本.

laohu588 commented 4 years ago

@JiYou @crazystone @leftstick @meigesir

moholi commented 4 years ago

这个跟服务器有关系吧,你看下linux用户有最大文件打开数限制的。

leftstick commented 4 years ago

可能是链接数超过1024了,linux 系统一般默认的客户端最大连接数1024,

  1. 尝试ulimit -n看看操作系统最大文件符限制是多少?
  2. 尝试判断下,现在一共有多少个客户端连接上来,按理说不应该会有这么多。。。
xuxueli commented 4 years ago

你好,问题无法复现,需要进一步提供复现步骤。

PS:建议升级最新release版本。