Jenkins有太多文件打开错误

时间:2014-06-06 15:03:41

标签: groovy jenkins

我们在启动时从Jenkins收到此错误。根据我的知识,这在简单重启后发生,没有进行任何配置更改。容器已与操作系统一起重新启动。

org.jvnet.hudson.reactor.ReactorException: org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed: 
IO Exception attempting to load global transforms:/[proprietary path]/jenkins/WEB-INF/lib/groovy-all-1.8.9.jar (Too many open files)

1 error

at org.jvnet.hudson.reactor.Reactor.execute(Reactor.java:246) 
at jenkins.InitReactorRunner.run(InitReactorRunner.java:43) 
at jenkins.model.Jenkins.executeReactor(Jenkins.java:913) 
at jenkins.model.Jenkins.<init>(Jenkins.java:812) 
at hudson.model.Hudson.<init>(Hudson.java:81) 
at hudson.model.Hudson.<init>(Hudson.java:77) 
at hudson.WebAppMain$3.run(WebAppMain.java:221) 
Caused by: org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed: 
IO Exception attempting to load global transforms:/[proprietary path]/jenkins/WEB-INF/lib/groovy-all-1.8.9.jar (Too many open files)

1 error

at org.codehaus.groovy.control.ErrorCollector.failIfErrors(ErrorCollector.java:302) 
at org.codehaus.groovy.control.ProcessingUnit.completePhase(ProcessingUnit.java:143) 
at org.codehaus.groovy.control.ProcessingUnit.gotoPhase(ProcessingUnit.java:162) 
at org.codehaus.groovy.control.CompilationUnit.compile(CompilationUnit.java:493) 
at groovy.lang.GroovyClassLoader.doParseClass(GroovyClassLoader.java:302) 
at groovy.lang.GroovyClassLoader.parseClass(GroovyClassLoader.java:281) 
at groovy.lang.GroovyShell.parseClass(GroovyShell.java:731) 
at groovy.lang.GroovyShell.parse(GroovyShell.java:743) 
at groovy.lang.GroovyShell.parse(GroovyShell.java:723) 
at groovy.lang.GroovyShell.parse(GroovyShell.java:790) 
at hudson.util.spring.BeanBuilder.parse(BeanBuilder.java:133) 
at hudson.plugins.active_directory.ActiveDirectorySecurityRealm.createSecurityComponents(ActiveDirectorySecurityRealm.java:130) 
at hudson.security.SecurityRealm.getSecurityComponents(SecurityRealm.java:398) 
at hudson.security.HudsonFilter.reset(HudsonFilter.java:134) 
at jenkins.model.Jenkins.setSecurityRealm(Jenkins.java:2053) 
at jenkins.model.Jenkins$20.run(Jenkins.java:2629) 
at org.jvnet.hudson.reactor.TaskGraphBuilder$TaskImpl.run(TaskGraphBuilder.java:146) 
at org.jvnet.hudson.reactor.Reactor.runTask(Reactor.java:259) 
at jenkins.model.Jenkins$7.runTask(Jenkins.java:902) 
at org.jvnet.hudson.reactor.Reactor$2.run(Reactor.java:187) 
at org.jvnet.hudson.reactor.Reactor$Node.run(Reactor.java:94) 
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) 
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) 
at java.lang.Thread.run(Thread.java:745)

2 个答案:

答案 0 :(得分:3)

请查看Jenkins团队建议的basic solutions。它能解决问题吗?

答案 1 :(得分:1)

要检查机器上打开文件的最大限制,请使用以下命令:

cat /proc/sys/fs/file-max

增加打开文件数量的限制:

ulimit -n XXXX (where XXXX=new size)

例如:ulimit -n 8192

看看here